xtd 0.2.0
Loading...
Searching...
No Matches

◆ sign() [1/8]

static int32 xtd::math::sign ( decimal  value)
static

Returns a value indicating the sign of a double-precision floating-point number.

Parameters
valueA signed number.
Returns
int32 A number that indicates the sign of value, as shown in the following table.
Return value Meaning
-1 value is less than zero.
0 value is equal to zero.
1 value is greater than zero.
Exceptions
xtd::arithmetic_exceptionvalue is equal to NaN.