Summer.Batch.Extra.Utils.DoubleUtils Class Reference

Double helper. More...

Static Public Member Functions

static string ToString (double?double1)
 ToString method. More...
 
static string ToString (double?double1, string format, string culture)
 ToString method, with specified format and culture. More...
 
static int CompareTo (double?double1, double?double2)
 Compare two doubles. More...
 
static bool IsGreaterThan (double?double1, double?double2)
 Check if the first given double is greater than the second. More...
 
static bool IsLowerThan (double?double1, double?double2)
 Check if the first given double is lower than the second. More...
 
static double Abs (double?double1)
 Compute the absolute value of the given double. More...
 
static double Floor (double?double1)
 Compute the floored value of the given double. More...
 
static double Ceil (double?double1)
 Compute the ceiled value of the given double. More...
 
static long Round (double?double1)
 Compute the rounded value of the given double. More...
 
static double Add (double?double1, double?double2)
 Add two doubles. More...
 
static double Add (double?double1, double?double2, double?double3)
 Add three doubles. More...
 
static double Add (double?double1, double?double2, double?double3, double?double4)
 Add four doubles. More...
 
static double Add (double?double1, double?double2, double?double3, double?double4, double?double5)
 Add five doubles. More...
 
static double Substract (double?double1, double?double2)
 Substract two doubles. More...
 
static double Multiply (double?double1, double?double2)
 Multiply two doubles. More...
 
static double Divide (double?double1, double?double2)
 Divide two doubles. More...
 
static bool IsNullOrZeroValue (double?double1)
 Check if the given double is zero or null. More...
 
static bool IsNullOrZeroValue (double?double1, double epsilon)
 Check if the given double is zero or null. More...
 

Detailed Description

Double helper.

Member Function Documentation

static double Summer.Batch.Extra.Utils.DoubleUtils.Abs ( double?  double1)
static

Compute the absolute value of the given double.

Parameters
double1double?
Returns
the absolute value of parameter.
static double Summer.Batch.Extra.Utils.DoubleUtils.Add ( double?  double1,
double?  double2 
)
static

Add two doubles.

Parameters
double1double?
double2double?
Returns
the sum of the two arguments, handling null (ex : 3 + null = 3).
static double Summer.Batch.Extra.Utils.DoubleUtils.Add ( double?  double1,
double?  double2,
double?  double3 
)
static

Add three doubles.

Parameters
double1double?
double2double?
double3double?
Returns
the sum of the three arguments, handling null (ex : 3 + 2 + null = 5).
static double Summer.Batch.Extra.Utils.DoubleUtils.Add ( double?  double1,
double?  double2,
double?  double3,
double?  double4 
)
static

Add four doubles.

Parameters
double1double?
double2double?
double3double?
double4double?
Returns
the sum of the four arguments, handling null (ex : 3 + 2 + 6 + null = 11).
static double Summer.Batch.Extra.Utils.DoubleUtils.Add ( double?  double1,
double?  double2,
double?  double3,
double?  double4,
double?  double5 
)
static

Add five doubles.

Parameters
double1double?
double2double?
double3double?
double4double?
double5double?
Returns
the sum of the five arguments, handling null (ex : 3 + 2 + 6 + 1 + null = 12).
static double Summer.Batch.Extra.Utils.DoubleUtils.Ceil ( double?  double1)
static

Compute the ceiled value of the given double.

Parameters
double1double?
Returns
the smallest (closest to negative infinity) floating-point value that is greater than or equal to the argument and is equal to a mathematical integer.
static int Summer.Batch.Extra.Utils.DoubleUtils.CompareTo ( double?  double1,
double?  double2 
)
static

Compare two doubles.

Parameters
double1double?
double2double?
Returns
the value 0 if double2 is numerically equal double1; a value less than 0 if this double1 is numerically less than double2; and a value greater than 0 if double1 is numerically greater than double2. Null in case of null argument(s).
static double Summer.Batch.Extra.Utils.DoubleUtils.Divide ( double?  double1,
double?  double2 
)
static

Divide two doubles.

Parameters
double1double?
double2double?
Returns
the division between double1 and double2. Null in case of null argument.
static double Summer.Batch.Extra.Utils.DoubleUtils.Floor ( double?  double1)
static

Compute the floored value of the given double.

Parameters
double1double?
Returns
the largest (closest to positive infinity) floating-point value that less than or equal to the argument and is equal to a mathematical integer.
static bool Summer.Batch.Extra.Utils.DoubleUtils.IsGreaterThan ( double?  double1,
double?  double2 
)
static

Check if the first given double is greater than the second.

Parameters
double1double?
double2double?
Returns
true if double1 is numerically greater than double2. Otherwise false.
static bool Summer.Batch.Extra.Utils.DoubleUtils.IsLowerThan ( double?  double1,
double?  double2 
)
static

Check if the first given double is lower than the second.

Parameters
double1double?
double2double?
Returns
true if double1 is numerically lower than double2. Otherwise false.
static bool Summer.Batch.Extra.Utils.DoubleUtils.IsNullOrZeroValue ( double?  double1)
static

Check if the given double is zero or null.

Parameters
double1double?
Returns
true if argument is null or argument == 0.
static bool Summer.Batch.Extra.Utils.DoubleUtils.IsNullOrZeroValue ( double?  double1,
double  epsilon 
)
static

Check if the given double is zero or null.

Parameters
double1double?
epsilontolerance
Returns
true if argument is null or argument == 0.
static double Summer.Batch.Extra.Utils.DoubleUtils.Multiply ( double?  double1,
double?  double2 
)
static

Multiply two doubles.

Parameters
double1double?
double2double?
Returns
the product between double1 and double2. Null in case of null argument.
static long Summer.Batch.Extra.Utils.DoubleUtils.Round ( double?  double1)
static

Compute the rounded value of the given double.

Parameters
double1double?
Returns
the value of the argument rounded to the nearest long value.
static double Summer.Batch.Extra.Utils.DoubleUtils.Substract ( double?  double1,
double?  double2 
)
static

Substract two doubles.

Parameters
double1double?
double2double?
Returns
the difference between double1 and double2. Null in case of null argument(s).
static string Summer.Batch.Extra.Utils.DoubleUtils.ToString ( double?  double1)
static

ToString method.

Parameters
double1double?
Returns
string representation of double1. Empty string if null.
static string Summer.Batch.Extra.Utils.DoubleUtils.ToString ( double?  double1,
string  format,
string  culture 
)
static

ToString method, with specified format and culture.

Parameters
double1double?
formatstring
culturestring
Returns
string representation of double1 with the specified format and culture.

The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Utils/DoubleUtils.cs