Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.
Public Fields | |
static constexpr double | e |
Represents the natural logarithmic base, specified by the constant, e. This field is constant. | |
static constexpr double | epsilon |
Represents the smallest positive Double value greater than zero. This field is constant. | |
static constexpr double | infinity |
Represents infinity. This field is constant. | |
static constexpr double | max_value |
Represents the largest possible value of double. This field is constant. | |
static constexpr double | min_value |
Represents the smallest possible value of double. This field is constant. | |
static constexpr double | NaN |
Represents not a number (NaN). This field is constant. | |
static constexpr double | negative_infinity |
Represents negative infinity. This field is constant. | |
static constexpr double | pi |
Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π. This field is constant. | |
static constexpr double | positive_infinity |
Represents positive infinity. This field is constant. | |
static constexpr double | tau |
Represents the number of radians in one turn, specified by the constant, τ. | |
Public Static Methods | |
static decimal | abs (decimal value) |
Returns the absolute value of a decimal number. | |
static double | abs (double value) |
Returns the absolute value of a double-precision floating-point number. | |
static float | abs (float value) |
Returns the absolute value of a single-precision floating-point number. | |
static int16 | abs (int16 value) |
Returns the absolute value of a 16-bit signed integer. | |
static int32 | abs (int32 value) |
Returns the absolute value of a 32-bit signed integer. | |
static int64 | abs (int64 value) |
Returns the absolute value of a 64-bit signed integer. | |
static sbyte | abs (sbyte value) |
Returns the absolute value of a 8-bit signed integer. | |
static slong | abs (slong value) |
Returns the absolute value of a 64-bit signed integer. | |
static double | acos (double value) |
Returns the angle whose cosine is the specified number. | |
static double | asin (double value) |
Returns the angle whose sine is the specified number. | |
static double | atan (double value) |
Returns the angle whose tangent is the specified number. | |
static double | atan2 (double y, double x) |
Returns the angle whose tangent is the specified number. | |
static int64 | big_mul (int32 a, int32 b) |
Produces the full product of two 32-bit numbers. | |
static decimal | ceiling (decimal value) |
Returns the smallest integer greater than or equal to the specified double-precision floating-point number. | |
static double | ceiling (double value) |
Returns the smallest integer greater than or equal to the specified double-precision floating-point number. | |
static xtd::byte | clamp (xtd::byte value, xtd::byte min, xtd::byte max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static decimal | clamp (decimal value, decimal min, decimal max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static double | clamp (double value, double min, double max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static int16 | clamp (int16 value, int16 min, int16 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static int32 | clamp (int32 value, int32 min, int32 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static int64 | clamp (int64 value, int64 min, int64 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static slong | clamp (slong value, slong min, slong max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static sbyte | clamp (sbyte value, sbyte min, sbyte max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static float | clamp (float value, float min, float max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static uint16 | clamp (uint16 value, uint16 min, uint16 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static uint32 | clamp (uint32 value, uint32 min, uint32 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static uint64 | clamp (uint64 value, uint64 min, uint64 max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static xtd::ulong | clamp (xtd::ulong value, xtd::ulong min, xtd::ulong max) noexcept |
Returns value clamped to the inclusive range of min and max. | |
static double | cos (double value) |
Returns the cosine of the specified angle. | |
static double | cosh (double value) |
Returns the hyperbolic cosine of the specified angle. | |
static double | degrees_to_radians (double degrees) noexcept |
Convert degrees to radians. | |
static int32 | div_rem (int32 dividend, int32 divisor, int32 &remainder) |
Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter. | |
static int64 | div_rem (int64 dividend, int64 divisor, int64 &remainder) |
Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter. | |
static double | exp (double value) |
Returns e raised to the specified power. | |
static decimal | floor (decimal value) |
Returns the largest integer less than or equal to the specified decimal number. | |
static double | floor (double value) |
Returns the largest integer less than or equal to the specified decimal number. | |
static double | ieee_remainder (double dividend, double divisor) |
Returns the remainder resulting from the division of a specified number by another specified number. | |
static bool | is_infinity (double value) noexcept |
Returns a value indicating whether the specified number evaluates to negative or positive infinity. | |
static bool | is_negative_infinity (double value) noexcept |
Returns a value indicating whether the specified number evaluates to negative infinity. | |
static bool | is_positive_infinity (double value) noexcept |
Returns a value indicating whether the specified number evaluates to positive infinity. | |
static bool | is_NaN (double value) noexcept |
Returns a value indicating whether the specified number evaluates to not a number. | |
static double | log (double value) |
Returns the natural (base e) logarithm of a specified number. | |
static double | log (double a, double new_base) |
Returns the logarithm of a specified number in a specified base. | |
static double | log10 (double value) |
Returns the base 10 logarithm of a specified number. | |
static xtd::byte | max (xtd::byte a, xtd::byte b) noexcept |
Returns the larger of two 8-bit unsigned integers. | |
static decimal | max (decimal a, decimal b) noexcept |
Returns the larger of two double single. | |
static double | max (double a, double b) noexcept |
Returns the larger of two double single. | |
static int16 | max (int16 a, int16 b) noexcept |
Returns the larger of two 16-bit signed integers. | |
static int32 | max (int32 a, int32 b) noexcept |
Returns the larger of two 32-bit signed integers. | |
static int64 | max (int64 a, int64 b) noexcept |
Returns the larger of two 64-bit signed integers. | |
static slong | max (slong a, slong b) noexcept |
Returns the larger of two 64-bit signed integers. | |
static sbyte | max (sbyte a, sbyte b) noexcept |
Returns the larger of two 8-bit signed integers. | |
static float | max (float a, float b) noexcept |
Returns the larger of two single single. | |
static uint16 | max (uint16 a, uint16 b) noexcept |
Returns the larger of two 16-bit unsigned integers. | |
static uint32 | max (uint32 a, uint32 b) noexcept |
Returns the larger of two 32-bit unsigned integers. | |
static uint64 | max (uint64 a, uint64 b) noexcept |
Returns the larger of two 64-bit unsigned integers. | |
static xtd::ulong | max (xtd::ulong a, xtd::ulong b) noexcept |
Returns the larger of two 64-bit unsigned integers. | |
static xtd::byte | min (xtd::byte a, xtd::byte b) noexcept |
Returns the smaller of two 8-bit unsigned integers. | |
static decimal | min (decimal a, decimal b) noexcept |
Returns the smaller of two double single. | |
static double | min (double a, double b) noexcept |
Returns the smaller of two double single. | |
static int16 | min (int16 a, int16 b) noexcept |
Returns the smaller of two 16-bit signed integers. | |
static int32 | min (int32 a, int32 b) noexcept |
Returns the smaller of two 32-bit signed integers. | |
static int64 | min (int64 a, int64 b) noexcept |
Returns the smaller of two 64-bit signed integers. | |
static slong | min (slong a, slong b) noexcept |
Returns the smaller of two 64-bit signed integers. | |
static sbyte | min (sbyte a, sbyte b) noexcept |
Returns the smaller of two 8-bit signed integers. | |
static float | min (float a, float b) noexcept |
Returns the smaller of two single single. | |
static uint16 | min (uint16 a, uint16 b) noexcept |
Returns the smaller of two 16-bit unsigned integers. | |
static uint32 | min (uint32 a, uint32 b) noexcept |
Returns the smaller of two 32-bit unsigned integers. | |
static uint64 | min (uint64 a, uint64 b) noexcept |
Returns the smaller of two 64-bit unsigned integers. | |
static xtd::ulong | min (xtd::ulong a, xtd::ulong b) noexcept |
Returns the smaller of two 64-bit unsigned integers. | |
static double | pow (double x, double y) |
Returns a specified number raised to the specified power. | |
static double | radians_to_degrees (double radians) noexcept |
Convert radians to degrees. | |
static decimal | round (decimal value) |
Rounds a double-precision floating-point value to the nearest integral value. | |
static decimal | round (decimal value, int32 decimals) |
Rounds a decimal value to a specified number of fractional digits. | |
static double | round (double value) |
Rounds a double-precision floating-point value to the nearest integral value. | |
static double | round (double value, int32 decimals) |
Rounds a decimal value to a specified number of fractional digits. | |
static int32 | sign (decimal value) |
Returns a value indicating the sign of a double-precision floating-point number. | |
static int32 | sign (double value) |
Returns a value indicating the sign of a double-precision floating-point number. | |
static int32 | sign (int16 value) |
Returns a value indicating the sign of a 16-bit signed integer. | |
static int32 | sign (int32 value) |
Returns a value indicating the sign of a 32-bit signed integer. | |
static int32 | sign (int64 value) |
Returns a value indicating the sign of a 64-bit signed integer. | |
static int32 | sign (slong value) |
Returns a value indicating the sign of a 64-bit signed integer. | |
static int32 | sign (sbyte value) |
Returns a value indicating the sign of an 8-bit signed integer. | |
static int32 | sign (float value) |
Returns a value indicating the sign of a single-precision floating-point number. | |
static double | sin (double value) |
Returns the sine of the specified angle. | |
static double | sinh (double value) |
Returns the hyperbolic sine of the specified angle. | |
static double | sqrt (double value) |
Returns the square root of a specified number. | |
static double | tan (double value) |
Returns the tangent of the specified angle. | |
static double | tanh (double value) |
Returns the hyperbolic tangent of the specified angle. | |
static decimal | truncate (decimal value) |
Calculates the integral part of a specified double-precision floating-point number. | |
static double | truncate (double value) |
Calculates the integral part of a specified double-precision floating-point number. | |
Returns the absolute value of a decimal number.
value | A number in the range std::numeric_limit<decimal>::lowest() <= value <= std::numeric_limit<decimal>::max(). |
|
static |
Returns the absolute value of a double-precision floating-point number.
value | A number in the range std::numeric_limit<double>::lowest() <= value <= std::numeric_limit<double>::max(). |
|
static |
Returns the absolute value of a single-precision floating-point number.
value | A number in the range std::numeric_limit<float>::lowest() <= value <= std::numeric_limit<float>::max(). |
Returns the absolute value of a 16-bit signed integer.
value | A number in the range std::numeric_limit<int16>::lowest() <= value <= std::numeric_limit<int16>::max(). |
xtd::overflow_exception | value equals std::numeric_limit<int16>::lowest(). |
Returns the absolute value of a 32-bit signed integer.
value | A number in the range std::numeric_limit<int32>::lowest() <= value <= std::numeric_limit<int32>::max(). |
xtd::overflow_exception | value equals std::numeric_limit<int32>::lowest(). |
Returns the absolute value of a 64-bit signed integer.
value | A number in the range std::numeric_limit<int64>::min() <= value <= std::numeric_limit<int64>::max(). |
xtd::overflow_exception | value equals std::numeric_limit<int64>::lowest(). |
Returns the absolute value of a 8-bit signed integer.
value | A number in the range std::numeric_limit<sbyte>::lowest() <= value <= std::numeric_limit<sbyte>::max(). |
xtd::overflow_exception | value equals std::numeric_limit<sbyte_tsbyte_t>::lowest(). |
Returns the absolute value of a 64-bit signed integer.
value | A number in the range std::numeric_limit<slong>::lowest() <= value <= std::numeric_limit<slong>::max(). |
xtd::overflow_exception | value equals std::numeric_limit<slong>::lowest(). |
|
static |
Returns the angle whose cosine is the specified number.
value | A number representing a cosine, where -1 <= value <= 1. |
|
static |
Returns the angle whose sine is the specified number.
value | A number representing a sine, where -1 <= value <= 1. |
|
static |
Returns the angle whose tangent is the specified number.
value | A number representing a tangent. |
|
static |
Returns the angle whose tangent is the specified number.
y | The y coordinate of a point. |
x | The x coordinate of a point. |
Observe the following:
Produces the full product of two 32-bit numbers.
a | The first int32 to multiply. |
b | The second int32 to multiply. |
Returns the smallest integer greater than or equal to the specified double-precision floating-point number.
value | A double-precision floating-point number. |
|
static |
Returns the smallest integer greater than or equal to the specified double-precision floating-point number.
value | A double-precision floating-point number. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
|
staticnoexcept |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
|
staticnoexcept |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
|
staticnoexcept |
Returns value clamped to the inclusive range of min and max.
value | The value to be clamped. |
min | The lower bound of the result. |
max | The upper bound of the result. |
|
static |
Returns the cosine of the specified angle.
value | An angle, measured in radians. |
|
static |
Returns the hyperbolic cosine of the specified angle.
value | An angle, measured in radians. |
|
staticnoexcept |
Convert degrees to radians.
degrees | A double-precision floating-point number. |
Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter.
dividend | The dividend. |
divisor | The divisor. |
remainder | An angle, measured in radians. |
Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.
dividend | The dividend. |
divisor | The divisor. |
remainder | An angle, measured in radians. |
|
static |
Returns e raised to the specified power.
value | A number specifying a power. |
Returns the largest integer less than or equal to the specified decimal number.
value | A double-precision floating-point number. |
|
static |
Returns the largest integer less than or equal to the specified decimal number.
value | A double-precision floating-point number. |
|
static |
Returns the remainder resulting from the division of a specified number by another specified number.
dividend | A dividend. |
divisor | A divisor. |
|
staticnoexcept |
Returns a value indicating whether the specified number evaluates to negative or positive infinity.
value | A double-precision floating-point number. |
|
staticnoexcept |
Returns a value indicating whether the specified number evaluates to negative infinity.
value | A double-precision floating-point number. |
|
staticnoexcept |
Returns a value indicating whether the specified number evaluates to positive infinity.
value | A double-precision floating-point number. |
|
staticnoexcept |
Returns a value indicating whether the specified number evaluates to not a number.
value | A double-precision floating-point number. |
|
static |
Returns the natural (base e) logarithm of a specified number.
value | A number whose logarithm is to be found. |
value parameter | Return value |
---|---|
Positive | The natural logarithm of d; that is, ln value, or log e value |
Zero | xtd::math::negative_infinity |
Negative | xtd::math::NaN |
Equal to xtd::math::NaN | xtd::math::NaN |
Equal to xtd::math::positive_infinity | xtd::math::positive_infinity |
|
static |
Returns the logarithm of a specified number in a specified base.
a | The number whose logarithm is to be found. |
new_base | The base of the logarithm. |
a | new_base | Return value |
---|---|---|
a > 0 | (0 < new_base < 1) -or- (new_base > 1) | log new_base (a) |
a < 0 | (any value) | xtd::math::NaN |
(any value) | new_base < 0 | xtd::math::NaN |
a != 1 | new_base = 0 | xtd::math::NaN |
a != 1 | new_base = xtd::math::positive_infinity | xtd::math::NaN |
a = xtd::math::NaN | (any value) | xtd::math::NaN |
(any value) | new_base = xtd::math::NaN | xtd::math::NaN |
(any value) | new_base = 1 | xtd::math::NaN |
a = 0 | 0 < new_base < 1 | xtd::math::positive_infinity |
a = 0 | new_base > 1 | xtd::math::negative_infinity |
a = xtd::math::positive_infinity | 0 < new_base < 1 | xtd::math::negative_infinity |
a = xtd::math::positive_infinity | new_base > 1 | xtd::math::positive_infinity |
a = 1 | new_base = 0 | 0 |
a = 1 | new_base = xtd::math::positive_infinity | 0 |
|
static |
Returns the base 10 logarithm of a specified number.
value | A number whose logarithm is to be found. |
value parameter | Return value |
---|---|
Positive | The natural logarithm of d; that is, ln value, or log e value |
Zero | xtd::math::negative_infinity |
Negative | xtd::math::NaN |
Equal to xtd::math::NaN | xtd::math::NaN |
Equal to xtd::math::positive_infinity | xtd::math::positive_infinity |
Returns the larger of two 8-bit unsigned integers.
a | The first of two 8-bit unsigned integers to compare. |
b | The second of two 8-bit unsigned integers to compare. |
Returns the larger of two double single.
a | The first of two double single to compare. |
b | The second of two double single to compare. |
|
staticnoexcept |
Returns the larger of two double single.
a | The first of two double single to compare. |
b | The second of two double single to compare. |
Returns the larger of two 16-bit signed integers.
a | The first of two 16-bit signed integers to compare. |
b | The second of two 16-bit signed integers to compare. |
Returns the larger of two 32-bit signed integers.
a | The first of two 32-bit signed integers to compare. |
b | The second of two 32-bit signed integers to compare. |
Returns the larger of two 64-bit signed integers.
a | The first of two 64-bit signed integers to compare. |
b | The second of two 64-bit signed integers to compare. |
Returns the larger of two 64-bit signed integers.
a | The first of two 64-bit signed integers to compare. |
b | The second of two 64-bit signed integers to compare. |
Returns the larger of two 8-bit signed integers.
a | The first of two 8-bit signed integers to compare. |
b | The second of two 8-bit signed integers to compare. |
|
staticnoexcept |
Returns the larger of two single single.
a | The first of two single single to compare. |
b | The second of two single single to compare. |
Returns the larger of two 16-bit unsigned integers.
a | The first of two 16-bit unsigned integers to compare. |
b | The second of two 16-bit unsigned integers to compare. |
Returns the larger of two 32-bit unsigned integers.
a | The first of two 32-bit unsigned integers to compare. |
b | The second of two 32-bit unsigned integers to compare. |
Returns the larger of two 64-bit unsigned integers.
a | The first of two 64-bit unsigned integers to compare. |
b | The second of two 64-bit unsigned integers to compare. |
|
staticnoexcept |
Returns the larger of two 64-bit unsigned integers.
a | The first of two 64-bit unsigned integers to compare. |
b | The second of two 64-bit unsigned integers to compare. |
Returns the smaller of two 8-bit unsigned integers.
a | The first of two 8-bit unsigned integers to compare. |
b | The second of two 8-bit unsigned integers to compare. |
Returns the smaller of two double single.
a | The first of two double single to compare. |
b | The second of two double single to compare. |
|
staticnoexcept |
Returns the smaller of two double single.
a | The first of two double single to compare. |
b | The second of two double single to compare. |
Returns the smaller of two 16-bit signed integers.
a | The first of two 16-bit signed integers to compare. |
b | The second of two 16-bit signed integers to compare. |
Returns the smaller of two 32-bit signed integers.
a | The first of two 32-bit signed integers to compare. |
b | The second of two 32-bit signed integers to compare. |
Returns the smaller of two 64-bit signed integers.
a | The first of two 64-bit signed integers to compare. |
b | The second of two 64-bit signed integers to compare. |
Returns the smaller of two 64-bit signed integers.
a | The first of two 64-bit signed integers to compare. |
b | The second of two 64-bit signed integers to compare. |
Returns the smaller of two 8-bit signed integers.
a | The first of two 8-bit signed integers to compare. |
b | The second of two 8-bit signed integers to compare. |
|
staticnoexcept |
Returns the smaller of two single single.
a | The first of two single single to compare. |
b | The second of two single single to compare. |
Returns the smaller of two 16-bit unsigned integers.
a | The first of two 16-bit unsigned integers to compare. |
b | The second of two 16-bit unsigned integers to compare. |
Returns the smaller of two 32-bit unsigned integers.
a | The first of two 32-bit unsigned integers to compare. |
b | The second of two 32-bit unsigned integers to compare. |
Returns the smaller of two 64-bit unsigned integers.
a | The first of two 64-bit unsigned integers to compare. |
b | The second of two 64-bit unsigned integers to compare. |
|
staticnoexcept |
Returns the smaller of two 64-bit unsigned integers.
a | The first of two 64-bit unsigned integers to compare. |
b | The second of two 64-bit unsigned integers to compare. |
|
static |
Returns a specified number raised to the specified power.
x | A double-precision floating-point number to be raised to a power. |
y | A double-precision floating-point number that specifies a power. |
Parameters | Return value |
---|---|
x or y = math::NaN. | math::NaN |
x = Any value except math::NaN; y = 0. | 1 |
x = math::negative_infinity; y < 0. | 0 |
x = math::negative_infinity; y is positive odd integer. | math::negative_infinity |
x = math::negative_infinity; y is positive but not an odd integer. | math::positive_infinity |
x < 0 but not math::negative_infinity; y is not an integer, math::negative_infinity, or math::positive_infinity. | math::NaN |
x = -1; y = math::negative_infinity or math::positive_infinity. | math::NaN |
-1 < x < 1; y = math::negative_infinity. | math::positive_infinity |
-1 < x < 1; y = math::positive_infinity. | 0 |
x < -1 or x > 1; y = math::negative_infinity. | 0 |
x < -1 or x > 1; y = math::positive_infinity. | math::positive_infinity |
x = 0; y < 0. | math::positive_infinity |
x = 0; y > 0. | 0 |
x = 1; y is any value except math::NaN. | 1 |
x = math::positive_infinity; y < 0 | 0 |
x = math::positive_infinity; y > 0. | math::positive_infinity |
|
staticnoexcept |
Convert radians to degrees.
radians | A double-precision floating-point number. |
Rounds a double-precision floating-point value to the nearest integral value.
value | A double-precision floating-point number to be rounded. |
Rounds a decimal value to a specified number of fractional digits.
value | A double-precision floating-point number to be rounded. |
decimals | The number of decimal places in the return value. |
|
static |
Rounds a double-precision floating-point value to the nearest integral value.
value | A double-precision floating-point number to be rounded. |
|
static |
Rounds a decimal value to a specified number of fractional digits.
value | A double-precision floating-point number to be rounded. |
decimals | The number of decimal places in the return value. |
Returns a value indicating the sign of a double-precision floating-point number.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
xtd::arithmetic_exception | value is equal to NaN. |
|
static |
Returns a value indicating the sign of a double-precision floating-point number.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
xtd::arithmetic_exception | value is equal to NaN. |
Returns a value indicating the sign of a 16-bit signed integer.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
Returns a value indicating the sign of a 32-bit signed integer.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
Returns a value indicating the sign of a 64-bit signed integer.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
Returns a value indicating the sign of a 64-bit signed integer.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
Returns a value indicating the sign of an 8-bit signed integer.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
|
static |
Returns a value indicating the sign of a single-precision floating-point number.
value | A signed number. |
Return value | Meaning |
---|---|
-1 | value is less than zero. |
0 | value is equal to zero. |
1 | value is greater than zero. |
xtd::arithmetic_exception | value is equal to NaN. |
|
static |
Returns the sine of the specified angle.
value | An angle, measured in radians. |
|
static |
Returns the hyperbolic sine of the specified angle.
value | An angle, measured in radians. |
|
static |
Returns the square root of a specified number.
value | The number whose square root is to be found. |
value parameter | Return value |
---|---|
Zero or positive | The positive square root of d. |
Negative | math::NaN |
Equals math::NaN | math::NaN |
Equals math::positive_infinity | math::positive_infinity |
|
static |
Returns the tangent of the specified angle.
value | An angle, measured in radians. |
|
static |
Returns the hyperbolic tangent of the specified angle.
value | An angle, measured in radians. |
Calculates the integral part of a specified double-precision floating-point number.
value | A number to truncate. |
value | Return value |
---|---|
NaN | NaN |
NegativeInfinity | NegativeInfinity |
PositiveInfinity | PositiveInfinity |
|
static |
Calculates the integral part of a specified double-precision floating-point number.
value | A number to truncate. |
value | Return value |
---|---|
math::NaN | math::NaN |
math::negative_infinity | math::negative_infinity |
math::positive_infinity | math::positive_infinity |
|
staticconstexpr |
Represents the natural logarithmic base, specified by the constant, e. This field is constant.
|
staticconstexpr |
Represents the smallest positive Double value greater than zero. This field is constant.
|
staticconstexpr |
Represents infinity. This field is constant.
|
staticconstexpr |
Represents the largest possible value of double. This field is constant.
|
staticconstexpr |
Represents the smallest possible value of double. This field is constant.
|
staticconstexpr |
Represents not a number (NaN). This field is constant.
|
staticconstexpr |
Represents negative infinity. This field is constant.
|
staticconstexpr |
Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π. This field is constant.
|
staticconstexpr |
Represents positive infinity. This field is constant.
|
staticconstexpr |
Represents the number of radians in one turn, specified by the constant, τ.