xtd 0.2.0
Loading...
Searching...
No Matches
xtd::math Class Reference
Inheritance diagram for xtd::math:
xtd::static_object

Definition

Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.

Namespace
xtd
Library
xtd.core
Remarks
This class cannot be inherited.
Examples
The following example uses several mathematical and trigonometric functions from the xtd::math class to calculate the inner angles of a trapezoid.
#include <xtd/console>
#include <xtd/math>
#include <xtd/startup>
using namespace xtd;
namespace math_example {
// The following class represents simple functionality of the trapezoid.
class math_trapezoid_sample {
public:
// The main entry point for the application.
static auto main() {
auto trpz = math_trapezoid_sample {20.0, 10.0, 8.0, 6.0};
console::write_line("The trapezoid's bases are 20.0 and 10.0, the trapezoid's legs are 8.0 and 6.0");
auto h = trpz.get_height();
console::write_line("trapezoid height is: {0}", h);
auto dx_r = trpz.get_left_base_radian_angle();
console::write_line("trapezoid left base angle is: {0} Radians", dx_r);
auto dy_r = trpz.get_right_base_radian_angle();
console::write_line("trapezoid right base angle is: {0} Radians", dy_r);
auto dx_d = trpz.get_left_base_degree_angle();
console::write_line("trapezoid left base angle is: {0} Degrees", dx_d);
auto dy_d = trpz.get_right_base_degree_angle();
console::write_line("trapezoid left base angle is: {0} Degrees", dy_d);
}
math_trapezoid_sample(double long_base, double short_base, double left_leg, double right_leg) {
long_base_ = math::abs(long_base);
short_base_ = math::abs(short_base);
left_leg_ = math::abs(left_leg);
right_leg_ = math::abs(right_leg);
}
auto get_height()->double {
auto x = get_right_small_base();
return math::sqrt(math::pow(right_leg_, 2.0) - math::pow(x, 2.0));
}
auto get_square()->double {
return get_height() * long_base_ / 2.0;
}
auto get_left_base_radian_angle()->double {
auto sin_x = get_height() / left_leg_;
return math::round(math::asin(sin_x), 2);
}
auto get_right_base_radian_angle()->double {
auto x = get_right_small_base();
auto cos_x = (math::pow(right_leg_, 2.0) + math::pow(x, 2.0) - math::pow(get_height(), 2.0)) / (2 * x * right_leg_);
return math::round(math::acos(cos_x), 2);
}
auto get_left_base_degree_angle()->double {
auto x = math::radians_to_degrees(get_left_base_radian_angle());
return math::round(x, 2);
}
auto get_right_base_degree_angle()->double {
auto x = math::radians_to_degrees(get_right_base_radian_angle());
return math::round(x, 2);
}
private:
auto get_right_small_base()->double {
return (math::pow(right_leg_, 2.0) - math::pow(left_leg_, 2.0) + math::pow(long_base_, 2.0) + math::pow(short_base_, 2.0) - 2 * short_base_ * long_base_) / (2 * (long_base_ - short_base_));
}
double long_base_ = .0;
double short_base_ = .0;
double left_leg_ = .0;
double right_leg_ = .0;
};
}
startup_(math_example::math_trapezoid_sample::main);
// This code produces the following output :
//
// The trapezoid's bases are 20.0 and 10.0, the trapezoid's legs are 8.0 and 6.0
// trapezoid height is: 4.8
// trapezoid left base angle is: 0.64 Radians
// trapezoid right base angle is: 0.93 Radians
// trapezoid left base angle is: 36.67 Degrees
// trapezoid left base angle is: 53.29 Degrees
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:175
@ h
The H key.
@ x
The X key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10

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.
 

Member Function Documentation

◆ abs() [1/8]

static decimal xtd::math::abs ( decimal  value)
static

Returns the absolute value of a decimal number.

Parameters
valueA number in the range std::numeric_limit<decimal>::lowest() <= value <= std::numeric_limit<decimal>::max().
Returns
A decimal number, x, such that 0 <= x <= std::numeric_limit<decimal>::max()std::numeric_limit<decimal>::max().

◆ abs() [2/8]

static double xtd::math::abs ( double  value)
static

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

Parameters
valueA number in the range std::numeric_limit<double>::lowest() <= value <= std::numeric_limit<double>::max().
Returns
A double-precision floating-point number, x, such that 0 <= x <= std::numeric_limit<double>::max().

◆ abs() [3/8]

static float xtd::math::abs ( float  value)
static

Returns the absolute value of a single-precision floating-point number.

Parameters
valueA number in the range std::numeric_limit<float>::lowest() <= value <= std::numeric_limit<float>::max().
Returns
A single-precision floating-point number, x, such that 0 <= x <= std::numeric_limit<float>::max().

◆ abs() [4/8]

static int16 xtd::math::abs ( int16  value)
static

Returns the absolute value of a 16-bit signed integer.

Parameters
valueA number in the range std::numeric_limit<int16>::lowest() <= value <= std::numeric_limit<int16>::max().
Returns
A 16-bit signed integer, x, such that 0 <= x <= std::numeric_limit<int16>::max().
Exceptions
xtd::overflow_exceptionvalue equals std::numeric_limit<int16>::lowest().

◆ abs() [5/8]

static int32 xtd::math::abs ( int32  value)
static

Returns the absolute value of a 32-bit signed integer.

Parameters
valueA number in the range std::numeric_limit<int32>::lowest() <= value <= std::numeric_limit<int32>::max().
Returns
A 32-bit signed integer, x, such that 0 <= x <= std::numeric_limit<int32>::max().
Exceptions
xtd::overflow_exceptionvalue equals std::numeric_limit<int32>::lowest().

◆ abs() [6/8]

static int64 xtd::math::abs ( int64  value)
static

Returns the absolute value of a 64-bit signed integer.

Parameters
valueA number in the range std::numeric_limit<int64>::min() <= value <= std::numeric_limit<int64>::max().
Returns
A 64-bit signed integer, x, such that 0 <= x <= std::numeric_limit<int64>::max().
Exceptions
xtd::overflow_exceptionvalue equals std::numeric_limit<int64>::lowest().

◆ abs() [7/8]

static sbyte xtd::math::abs ( sbyte  value)
static

Returns the absolute value of a 8-bit signed integer.

Parameters
valueA number in the range std::numeric_limit<sbyte>::lowest() <= value <= std::numeric_limit<sbyte>::max().
Returns
A 8-bit signed integer, x, such that 0 <= x <= std::numeric_limit<sbyte>::max().
Exceptions
xtd::overflow_exceptionvalue equals std::numeric_limit<sbyte_tsbyte_t>::lowest().

◆ abs() [8/8]

static slong xtd::math::abs ( slong  value)
static

Returns the absolute value of a 64-bit signed integer.

Parameters
valueA number in the range std::numeric_limit<slong>::lowest() <= value <= std::numeric_limit<slong>::max().
Returns
A 8-bit signed integer, x, such that 0 <= x <= std::numeric_limit<slong>::max().
Exceptions
xtd::overflow_exceptionvalue equals std::numeric_limit<slong>::lowest().

◆ acos()

static double xtd::math::acos ( double  value)
static

Returns the angle whose cosine is the specified number.

Parameters
valueA number representing a cosine, where -1 <= value <= 1.
Returns
An angle, A, measured in radians, such that 0 <= A <= PI.
-or-
math::NaN if value < -1 or d > 1.

◆ asin()

static double xtd::math::asin ( double  value)
static

Returns the angle whose sine is the specified number.

Parameters
valueA number representing a sine, where -1 <= value <= 1.
Returns
An angle, A, measured in radians, such that -PI/2 <= A <= PI/2.
-or-
math::NaN if value < -1 or d > 1.

◆ atan()

static double xtd::math::atan ( double  value)
static

Returns the angle whose tangent is the specified number.

Parameters
valueA number representing a tangent.
Returns
An angle, A, measured in radians, such that -PI/2 <= ? <= PI/2.
-or-
math::NaN if value equals math::NaN, -PI/2 rounded to double precision (-1.5707963267949) if d equals math::negative_infinity, or PI/2 rounded to double precision (1.5707963267949) if d equals math::positive_infinity

◆ atan2()

static double xtd::math::atan2 ( double  y,
double  x 
)
static

Returns the angle whose tangent is the specified number.

Parameters
yThe y coordinate of a point.
xThe x coordinate of a point.
Returns
An angle, A, measured in radians, such that -PI <= A <= PI, and tan(?) = y / x, where (x, y) is a point in the Cartesian plane.

Observe the following:

  • For (x, y) in quadrant 1, 0 < A < PI/2.
  • For (x, y) in quadrant 2, PI/2 < A <= PI.
  • For (x, y) in quadrant 3, -PI < A < -PI/2.
  • For (x, y) in quadrant 4, -PI/2 < A < 0.
  • For points on the boundaries of the quadrants, the return value is the following:
  • If x is 0 and y is not negative, A = 0.
  • If x is 0 and y is negative, A = PI.
  • If x is positive and y is 0, A = PI/2.
  • If x is negative and y is 0, A = -PI/2.
    Remarks
    The return value is the angle in the Cartesian plane formed by the x-axis, and a vector starting from the origin, (0,0), and terminating at the point, (x,y).

◆ big_mul()

static int64 xtd::math::big_mul ( int32  a,
int32  b 
)
static

Produces the full product of two 32-bit numbers.

Parameters
aThe first int32 to multiply.
bThe second int32 to multiply.
Returns
The int64 containing the product of the specified numbers.

◆ ceiling() [1/2]

static decimal xtd::math::ceiling ( decimal  value)
static

Returns the smallest integer greater than or equal to the specified double-precision floating-point number.

Parameters
valueA double-precision floating-point number.
Returns
The smallest integer greater than or equal to value. If value is equal to xtd::math::NaN, xtd::math::negative_infinity, or xtd::math::positive_infinity, that value is returned.

◆ ceiling() [2/2]

static double xtd::math::ceiling ( double  value)
static

Returns the smallest integer greater than or equal to the specified double-precision floating-point number.

Parameters
valueA double-precision floating-point number.
Returns
The smallest integer greater than or equal to value. If value is equal to xtd::math::NaN, xtd::math::negative_infinity, or xtd::math::positive_infinity, that value is returned.

◆ clamp() [1/13]

static xtd::byte xtd::math::clamp ( xtd::byte  value,
xtd::byte  min,
xtd::byte  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [2/13]

static decimal xtd::math::clamp ( decimal  value,
decimal  min,
decimal  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [3/13]

static double xtd::math::clamp ( double  value,
double  min,
double  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [4/13]

static int16 xtd::math::clamp ( int16  value,
int16  min,
int16  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [5/13]

static int32 xtd::math::clamp ( int32  value,
int32  min,
int32  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [6/13]

static int64 xtd::math::clamp ( int64  value,
int64  min,
int64  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [7/13]

static slong xtd::math::clamp ( slong  value,
slong  min,
slong  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [8/13]

static sbyte xtd::math::clamp ( sbyte  value,
sbyte  min,
sbyte  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [9/13]

static float xtd::math::clamp ( float  value,
float  min,
float  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [10/13]

static uint16 xtd::math::clamp ( uint16  value,
uint16  min,
uint16  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [11/13]

static uint32 xtd::math::clamp ( uint32  value,
uint32  min,
uint32  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [12/13]

static uint64 xtd::math::clamp ( uint64  value,
uint64  min,
uint64  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ clamp() [13/13]

static xtd::ulong xtd::math::clamp ( xtd::ulong  value,
xtd::ulong  min,
xtd::ulong  max 
)
staticnoexcept

Returns value clamped to the inclusive range of min and max.

Parameters
valueThe value to be clamped.
minThe lower bound of the result.
maxThe upper bound of the result.
Returns
value if min <= value <= max.
-or-
min if value < min.
>-or-
max if max < value.

◆ cos()

static double xtd::math::cos ( double  value)
static

Returns the cosine of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
The cosine of value. If value is equal to xtd::math::NaN, xtd::math::negative_infinity, or xtd::math::positive_infinity, this method returns xtd::math::NaN.

◆ cosh()

static double xtd::math::cosh ( double  value)
static

Returns the hyperbolic cosine of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
The hyperbolic cosine of value. If value is equal to xtd::math::negative_infinity() or xtd::math::positive_:infinity, xtd::math::positive_infinity is returned. If value is equal to xtd::math::NaN, xtd::math::NaN is returned.

◆ degrees_to_radians()

static double xtd::math::degrees_to_radians ( double  degrees)
staticnoexcept

Convert degrees to radians.

Parameters
degreesA double-precision floating-point number.
Returns
A converted degrees from radians.

◆ div_rem() [1/2]

static int32 xtd::math::div_rem ( int32  dividend,
int32  divisor,
int32 remainder 
)
static

Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter.

Parameters
dividendThe dividend.
divisorThe divisor.
remainderAn angle, measured in radians.
Returns
The remainder.

◆ div_rem() [2/2]

static int64 xtd::math::div_rem ( int64  dividend,
int64  divisor,
int64 remainder 
)
static

Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.

Parameters
dividendThe dividend.
divisorThe divisor.
remainderAn angle, measured in radians.
Returns
The remainder.

◆ exp()

static double xtd::math::exp ( double  value)
static

Returns e raised to the specified power.

Parameters
valueA number specifying a power.
Returns
The number e raised to the power d. If value equals xtd::math::NaN or xtd::math::positive_infinity, that value is returned. If value equals xtd::math::negative_infinity, 0 is returned.

◆ floor() [1/2]

static decimal xtd::math::floor ( decimal  value)
static

Returns the largest integer less than or equal to the specified decimal number.

Parameters
valueA double-precision floating-point number.
Returns
The largest integer less than or equal to value.

◆ floor() [2/2]

static double xtd::math::floor ( double  value)
static

Returns the largest integer less than or equal to the specified decimal number.

Parameters
valueA double-precision floating-point number.
Returns
The largest integer less than or equal to value.

◆ ieee_remainder()

static double xtd::math::ieee_remainder ( double  dividend,
double  divisor 
)
static

Returns the remainder resulting from the division of a specified number by another specified number.

Parameters
dividendA dividend.
divisorA divisor.
Returns
A number equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y falls halfway between two integers, the even integer is returned).
  • If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative.
  • If y = 0, xtd::math::NaN is returned.

◆ is_infinity()

static bool xtd::math::is_infinity ( double  value)
staticnoexcept

Returns a value indicating whether the specified number evaluates to negative or positive infinity.

Parameters
valueA double-precision floating-point number.
Returns
true if value evaluates to xtd::math::positive_infinity or xtd::math::negative_infinity; otherwise, false.
Deprecated:
Replaced by xtd::double_object::is_infinity - Will be removed in version 0.4.0.

◆ is_negative_infinity()

static bool xtd::math::is_negative_infinity ( double  value)
staticnoexcept

Returns a value indicating whether the specified number evaluates to negative infinity.

Parameters
valueA double-precision floating-point number.
Returns
true if value evaluates to xtd::math::negative_infinity; otherwise, false.
Deprecated:
Replaced by xtd::double_object::is_negative_infinity - Will be removed in version 0.4.0.

◆ is_positive_infinity()

static bool xtd::math::is_positive_infinity ( double  value)
staticnoexcept

Returns a value indicating whether the specified number evaluates to positive infinity.

Parameters
valueA double-precision floating-point number.
Returns
true if value evaluates to xtd::math::positive_infinity; otherwise, false.
Deprecated:
Replaced by xtd::double_object::is_positive_infinity - Will be removed in version 0.4.0.

◆ is_NaN()

static bool xtd::math::is_NaN ( double  value)
staticnoexcept

Returns a value indicating whether the specified number evaluates to not a number.

Parameters
valueA double-precision floating-point number.
Returns
true if value evaluates to not a number; otherwise, false.
Deprecated:
Replaced by xtd::double_object::is_NaN - Will be removed in version 0.4.0.

◆ log() [1/2]

static double xtd::math::log ( double  value)
static

Returns the natural (base e) logarithm of a specified number.

Parameters
valueA number whose logarithm is to be found.
Returns
One of the values in the following table.
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
Remarks
Parameter value is specified as a base 10 number.

◆ log() [2/2]

static double xtd::math::log ( double  a,
double  new_base 
)
static

Returns the logarithm of a specified number in a specified base.

Parameters
aThe number whose logarithm is to be found.
new_baseThe base of the logarithm.
Returns
One of the values in the following table. (+Infinity denotes math::positive_infinity, -Infinity denotes math::negative_infinity, and math::NaN denotes math::NaN.)
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

◆ log10()

static double xtd::math::log10 ( double  value)
static

Returns the base 10 logarithm of a specified number.

Parameters
valueA number whose logarithm is to be found.
Returns
One of the values in the following table.
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
Remarks
Parameter value is specified as a base 10 number.

◆ max() [1/13]

static xtd::byte xtd::math::max ( xtd::byte  a,
xtd::byte  b 
)
staticnoexcept

Returns the larger of two 8-bit unsigned integers.

Parameters
aThe first of two 8-bit unsigned integers to compare.
bThe second of two 8-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [2/13]

static decimal xtd::math::max ( decimal  a,
decimal  b 
)
staticnoexcept

Returns the larger of two double single.

Parameters
aThe first of two double single to compare.
bThe second of two double single to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [3/13]

static double xtd::math::max ( double  a,
double  b 
)
staticnoexcept

Returns the larger of two double single.

Parameters
aThe first of two double single to compare.
bThe second of two double single to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [4/13]

static int16 xtd::math::max ( int16  a,
int16  b 
)
staticnoexcept

Returns the larger of two 16-bit signed integers.

Parameters
aThe first of two 16-bit signed integers to compare.
bThe second of two 16-bit signed integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [5/13]

static int32 xtd::math::max ( int32  a,
int32  b 
)
staticnoexcept

Returns the larger of two 32-bit signed integers.

Parameters
aThe first of two 32-bit signed integers to compare.
bThe second of two 32-bit signed integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [6/13]

static int64 xtd::math::max ( int64  a,
int64  b 
)
staticnoexcept

Returns the larger of two 64-bit signed integers.

Parameters
aThe first of two 64-bit signed integers to compare.
bThe second of two 64-bit signed integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [7/13]

static slong xtd::math::max ( slong  a,
slong  b 
)
staticnoexcept

Returns the larger of two 64-bit signed integers.

Parameters
aThe first of two 64-bit signed integers to compare.
bThe second of two 64-bit signed integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [8/13]

static sbyte xtd::math::max ( sbyte  a,
sbyte  b 
)
staticnoexcept

Returns the larger of two 8-bit signed integers.

Parameters
aThe first of two 8-bit signed integers to compare.
bThe second of two 8-bit signed integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [9/13]

static float xtd::math::max ( float  a,
float  b 
)
staticnoexcept

Returns the larger of two single single.

Parameters
aThe first of two single single to compare.
bThe second of two single single to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [10/13]

static uint16 xtd::math::max ( uint16  a,
uint16  b 
)
staticnoexcept

Returns the larger of two 16-bit unsigned integers.

Parameters
aThe first of two 16-bit unsigned integers to compare.
bThe second of two 16-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [11/13]

static uint32 xtd::math::max ( uint32  a,
uint32  b 
)
staticnoexcept

Returns the larger of two 32-bit unsigned integers.

Parameters
aThe first of two 32-bit unsigned integers to compare.
bThe second of two 32-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [12/13]

static uint64 xtd::math::max ( uint64  a,
uint64  b 
)
staticnoexcept

Returns the larger of two 64-bit unsigned integers.

Parameters
aThe first of two 64-bit unsigned integers to compare.
bThe second of two 64-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ max() [13/13]

static xtd::ulong xtd::math::max ( xtd::ulong  a,
xtd::ulong  b 
)
staticnoexcept

Returns the larger of two 64-bit unsigned integers.

Parameters
aThe first of two 64-bit unsigned integers to compare.
bThe second of two 64-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is larger.

◆ min() [1/13]

static xtd::byte xtd::math::min ( xtd::byte  a,
xtd::byte  b 
)
staticnoexcept

Returns the smaller of two 8-bit unsigned integers.

Parameters
aThe first of two 8-bit unsigned integers to compare.
bThe second of two 8-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [2/13]

static decimal xtd::math::min ( decimal  a,
decimal  b 
)
staticnoexcept

Returns the smaller of two double single.

Parameters
aThe first of two double single to compare.
bThe second of two double single to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [3/13]

static double xtd::math::min ( double  a,
double  b 
)
staticnoexcept

Returns the smaller of two double single.

Parameters
aThe first of two double single to compare.
bThe second of two double single to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [4/13]

static int16 xtd::math::min ( int16  a,
int16  b 
)
staticnoexcept

Returns the smaller of two 16-bit signed integers.

Parameters
aThe first of two 16-bit signed integers to compare.
bThe second of two 16-bit signed integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [5/13]

static int32 xtd::math::min ( int32  a,
int32  b 
)
staticnoexcept

Returns the smaller of two 32-bit signed integers.

Parameters
aThe first of two 32-bit signed integers to compare.
bThe second of two 32-bit signed integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [6/13]

static int64 xtd::math::min ( int64  a,
int64  b 
)
staticnoexcept

Returns the smaller of two 64-bit signed integers.

Parameters
aThe first of two 64-bit signed integers to compare.
bThe second of two 64-bit signed integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [7/13]

static slong xtd::math::min ( slong  a,
slong  b 
)
staticnoexcept

Returns the smaller of two 64-bit signed integers.

Parameters
aThe first of two 64-bit signed integers to compare.
bThe second of two 64-bit signed integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [8/13]

static sbyte xtd::math::min ( sbyte  a,
sbyte  b 
)
staticnoexcept

Returns the smaller of two 8-bit signed integers.

Parameters
aThe first of two 8-bit signed integers to compare.
bThe second of two 8-bit signed integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [9/13]

static float xtd::math::min ( float  a,
float  b 
)
staticnoexcept

Returns the smaller of two single single.

Parameters
aThe first of two single single to compare.
bThe second of two single single to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [10/13]

static uint16 xtd::math::min ( uint16  a,
uint16  b 
)
staticnoexcept

Returns the smaller of two 16-bit unsigned integers.

Parameters
aThe first of two 16-bit unsigned integers to compare.
bThe second of two 16-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [11/13]

static uint32 xtd::math::min ( uint32  a,
uint32  b 
)
staticnoexcept

Returns the smaller of two 32-bit unsigned integers.

Parameters
aThe first of two 32-bit unsigned integers to compare.
bThe second of two 32-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [12/13]

static uint64 xtd::math::min ( uint64  a,
uint64  b 
)
staticnoexcept

Returns the smaller of two 64-bit unsigned integers.

Parameters
aThe first of two 64-bit unsigned integers to compare.
bThe second of two 64-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ min() [13/13]

static xtd::ulong xtd::math::min ( xtd::ulong  a,
xtd::ulong  b 
)
staticnoexcept

Returns the smaller of two 64-bit unsigned integers.

Parameters
aThe first of two 64-bit unsigned integers to compare.
bThe second of two 64-bit unsigned integers to compare.
Returns
Parameter a or b, whichever is smaller.

◆ pow()

static double xtd::math::pow ( double  x,
double  y 
)
static

Returns a specified number raised to the specified power.

Parameters
xA double-precision floating-point number to be raised to a power.
yA double-precision floating-point number that specifies a power.
Returns
The number x raised to the power y.
Remarks
The following table indicates the return value when various values or ranges of values are specified for the x and y parameters. For more information, see Double::math::positive_infinity, Double::math::negative_infinity, and Double::NaN.
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

◆ radians_to_degrees()

static double xtd::math::radians_to_degrees ( double  radians)
staticnoexcept

Convert radians to degrees.

Parameters
radiansA double-precision floating-point number.
Returns
A converted radians from degrees.

◆ round() [1/4]

static decimal xtd::math::round ( decimal  value)
static

Rounds a double-precision floating-point value to the nearest integral value.

Parameters
valueA double-precision floating-point number to be rounded.
Returns
The integer nearest value. If the fractional component of a is halfway between two integers, one of which is even and the other odd, then the even number is returned. Note that this method returns a double instead of an integral type.

◆ round() [2/4]

static decimal xtd::math::round ( decimal  value,
int32  decimals 
)
static

Rounds a decimal value to a specified number of fractional digits.

Parameters
valueA double-precision floating-point number to be rounded.
decimalsThe number of decimal places in the return value.
Returns
The number nearest to d that contains a number of fractional digits equal to decimals.

◆ round() [3/4]

static double xtd::math::round ( double  value)
static

Rounds a double-precision floating-point value to the nearest integral value.

Parameters
valueA double-precision floating-point number to be rounded.
Returns
The integer nearest value. If the fractional component of a is halfway between two integers, one of which is even and the other odd, then the even number is returned. Note that this method returns a double instead of an integral type.

◆ round() [4/4]

static double xtd::math::round ( double  value,
int32  decimals 
)
static

Rounds a decimal value to a specified number of fractional digits.

Parameters
valueA double-precision floating-point number to be rounded.
decimalsThe number of decimal places in the return value.
Returns
The number nearest to d that contains a number of fractional digits equal to decimals.

◆ 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.

◆ sign() [2/8]

static int32 xtd::math::sign ( double  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.

◆ sign() [3/8]

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

Returns a value indicating the sign of a 16-bit signed integer.

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.

◆ sign() [4/8]

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

Returns a value indicating the sign of a 32-bit signed integer.

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.

◆ sign() [5/8]

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

Returns a value indicating the sign of a 64-bit signed integer.

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.

◆ sign() [6/8]

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

Returns a value indicating the sign of a 64-bit signed integer.

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.

◆ sign() [7/8]

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

Returns a value indicating the sign of an 8-bit signed integer.

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.

◆ sign() [8/8]

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

Returns a value indicating the sign of a single-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.

◆ sin()

static double xtd::math::sin ( double  value)
static

Returns the sine of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
double The sine of value. If value is equal to math::NaN, math::negative_infinity, or math::positiveI_infinity, this method returns math::NaN.

◆ sinh()

static double xtd::math::sinh ( double  value)
static

Returns the hyperbolic sine of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
double The sine of a. If a is equal to math::NaN, math::negative_infinity, or math::positive_infinity, this method returns math::NaN.

◆ sqrt()

static double xtd::math::sqrt ( double  value)
static

Returns the square root of a specified number.

Parameters
valueThe number whose square root is to be found.
Returns
One of the values in the following table.
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

◆ tan()

static double xtd::math::tan ( double  value)
static

Returns the tangent of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
The tangent of value. If value is equal to math::NaN, math::negative_infinity, or math::positive_infinity, this method returns math::NaN.

◆ tanh()

static double xtd::math::tanh ( double  value)
static

Returns the hyperbolic tangent of the specified angle.

Parameters
valueAn angle, measured in radians.
Returns
The hyperbolic tangent of value. If value is equal to math::negative_infinity, this method returns -1. If value is equal to math::positive_infinity, this method returns 1. If value is equal to math::NaN, this method returns math::NaN.

◆ truncate() [1/2]

static decimal xtd::math::truncate ( decimal  value)
static

Calculates the integral part of a specified double-precision floating-point number.

Parameters
valueA number to truncate.
Returns
The integral part of d; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table.
value Return value
NaN NaN
NegativeInfinity NegativeInfinity
PositiveInfinity PositiveInfinity

◆ truncate() [2/2]

static double xtd::math::truncate ( double  value)
static

Calculates the integral part of a specified double-precision floating-point number.

Parameters
valueA number to truncate.
Returns
The integral part of d; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table.
value Return value
math::NaN math::NaN
math::negative_infinity math::negative_infinity
math::positive_infinity math::positive_infinity

Member Data Documentation

◆ e

constexpr double xtd::math::e
staticconstexpr

Represents the natural logarithmic base, specified by the constant, e. This field is constant.

Remarks
The value of this field is 2.7182818284590452354.

◆ epsilon

constexpr double xtd::math::epsilon
staticconstexpr

Represents the smallest positive Double value greater than zero. This field is constant.

Remarks
The value of this field is 4.94066e-324.
Deprecated:
Replaced by xtd::double_object::epsilon - Will be removed in version 0.4.0.

◆ infinity

constexpr double xtd::math::infinity
staticconstexpr

Represents infinity. This field is constant.

Remarks
The value of this field is std::numeric_limits<double>::infinity().
Deprecated:
Replaced by xtd::double_object::positive_infinity - Will be removed in version 0.4.0.

◆ max_value

constexpr double xtd::math::max_value
staticconstexpr

Represents the largest possible value of double. This field is constant.

Remarks
The value of this field is 1.7976931348623157E+308.
Deprecated:
Replaced by xtd::double_object::max_value - Will be removed in version 0.4.0.

◆ min_value

constexpr double xtd::math::min_value
staticconstexpr

Represents the smallest possible value of double. This field is constant.

Remarks
The value of this field is -1.7976931348623157E+308.
Deprecated:
Replaced by xtd::double_object::min_value - Will be removed in version 0.4.0.

◆ NaN

constexpr double xtd::math::NaN
staticconstexpr

Represents not a number (NaN). This field is constant.

Remarks
The value of this field is std::numeric_limits<double>::quiet_NaN().
Deprecated:
Replaced by xtd::double_object::NaN - Will be removed in version 0.4.0.

◆ negative_infinity

constexpr double xtd::math::negative_infinity
staticconstexpr

Represents negative infinity. This field is constant.

Remarks
The value of this field is -std::numeric_limits<double>::infinity().
Deprecated:
Replaced by xtd::double_object::negative_infinity - Will be removed in version 0.4.0.

◆ pi

constexpr double xtd::math::pi
staticconstexpr

Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π. This field is constant.

Remarks
The value of this field is 3.14159265358979323846.

◆ positive_infinity

constexpr double xtd::math::positive_infinity
staticconstexpr

Represents positive infinity. This field is constant.

Remarks
The value of this field is std::numeric_limits<double>::infinity().
Deprecated:
Replaced by xtd::double_object::positive_infinity - Will be removed in version 0.4.0.

◆ tau

constexpr double xtd::math::tau
staticconstexpr

Represents the number of radians in one turn, specified by the constant, τ.

Remarks
The value of this field is 2.7182818284590451.

The documentation for this class was generated from the following file: