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 |
Compute the absolute value of the given double.
- Parameters
-
double1 double?
- Returns
- the absolute value of parameter.
|
static |
Add two doubles.
- Parameters
-
double1 double? double2 double?
- Returns
- the sum of the two arguments, handling null (ex : 3 + null = 3).
|
static |
Add three doubles.
- Parameters
-
double1 double? double2 double? double3 double?
- Returns
- the sum of the three arguments, handling null (ex : 3 + 2 + null = 5).
|
static |
Add four doubles.
- Parameters
-
double1 double? double2 double? double3 double? double4 double?
- Returns
- the sum of the four arguments, handling null (ex : 3 + 2 + 6 + null = 11).
|
static |
Add five doubles.
- Parameters
-
double1 double? double2 double? double3 double? double4 double? double5 double?
- Returns
- the sum of the five arguments, handling null (ex : 3 + 2 + 6 + 1 + null = 12).
|
static |
Compute the ceiled value of the given double.
- Parameters
-
double1 double?
- 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 |
Compare two doubles.
- Parameters
-
double1 double? double2 double?
- 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 |
Divide two doubles.
- Parameters
-
double1 double? double2 double?
- Returns
- the division between double1 and double2. Null in case of null argument.
|
static |
Compute the floored value of the given double.
- Parameters
-
double1 double?
- 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 |
Check if the first given double is greater than the second.
- Parameters
-
double1 double? double2 double?
- Returns
- true if double1 is numerically greater than double2. Otherwise false.
|
static |
Check if the first given double is lower than the second.
- Parameters
-
double1 double? double2 double?
- Returns
- true if double1 is numerically lower than double2. Otherwise false.
|
static |
Check if the given double is zero or null.
- Parameters
-
double1 double?
- Returns
- true if argument is null or argument == 0.
|
static |
Check if the given double is zero or null.
- Parameters
-
double1 double? epsilon tolerance
- Returns
- true if argument is null or argument == 0.
|
static |
Multiply two doubles.
- Parameters
-
double1 double? double2 double?
- Returns
- the product between double1 and double2. Null in case of null argument.
|
static |
Compute the rounded value of the given double.
- Parameters
-
double1 double?
- Returns
- the value of the argument rounded to the nearest long value.
|
static |
Substract two doubles.
- Parameters
-
double1 double? double2 double?
- Returns
- the difference between double1 and double2. Null in case of null argument(s).
|
static |
ToString method.
- Parameters
-
double1 double?
- Returns
- string representation of double1. Empty string if null.
|
static |
ToString method, with specified format and culture.
- Parameters
-
double1 double? format string culture string
- 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