7#if defined(_MSC_VER) && defined(max)
8# if __cplusplus < 202302L
9# pragma message("The macro `max` is defined. If you include the `Windows.h` file, please define the 'NOMINMAX' constant before including `Windows.h`. xtd will undef the `max` macro.")
11# warning "The macro `max` is defined. If you include the `Windows.h` file, please define the 'NOMINMAX' constant before including `Windows.h`. xtd will undef the `max` macro."
15#if defined(_MSC_VER) && defined(min)
16# if __cplusplus < 202302L
17# pragma message("The macro `min` is defined. If you include the `Windows.h` file, please define the 'NOMINMAX' constant before including `Windows.h`. xtd will undef the `min` macro.")
19# warning "The macro `min` is defined. If you include the `Windows.h` file, please define the 'NOMINMAX' constant before including `Windows.h`. xtd will undef the `min` macro."
49 static constexpr double e = 2.7182818284590452354;
53 [[deprecated(
"Replaced by xtd::double_object::epsilon - Will be removed in version 0.4.0.")]]
58 [[deprecated(
"Replaced by xtd::double_object::positive_infinity - Will be removed in version 0.4.0.")]]
63 [[deprecated(
"Replaced by xtd::double_object::max_value - Will be removed in version 0.4.0.")]]
68 [[deprecated(
"Replaced by xtd::double_object::min_value - Will be removed in version 0.4.0.")]]
73 [[deprecated(
"Replaced by xtd::double_object::NaN - Will be removed in version 0.4.0.")]]
78 [[deprecated(
"Replaced by xtd::double_object::negative_infinity - Will be removed in version 0.4.0.")]]
82 static constexpr double pi = 3.14159265358979323846;
86 [[deprecated(
"Replaced by xtd::double_object::positive_infinity - Will be removed in version 0.4.0.")]]
90 static constexpr double tau = 2.7182818284590451;
103 static double abs(
double value);
107 static float abs(
float value);
137 static double acos(
double value);
142 static double asin(
double value);
147 static double atan(
double value);
200 static double clamp(
double value,
double min,
double max)
noexcept;
265 static double cos(
double value);
270 static double cosh(
double value);
293 static double exp(
double value);
316 [[deprecated(
"Replaced by xtd::double_object::is_infinity - Will be removed in version 0.4.0.")]]
323 [[deprecated(
"Replaced by xtd::double_object::is_negative_infinity - Will be removed in version 0.4.0.")]]
330 [[deprecated(
"Replaced by xtd::double_object::is_positive_infinity - Will be removed in version 0.4.0.")]]
337 [[deprecated(
"Replaced by xtd::double_object::is_NaN - Will be removed in version 0.4.0.")]]
338 static bool is_NaN(
double value)
noexcept;
352 static double log(
double value);
375 static double log(
double a,
double new_base);
405 static double max(
double a,
double b)
noexcept;
435 static float max(
float a,
float b)
noexcept;
471 static double min(
double a,
double b)
noexcept;
501 static float min(
float a,
float b)
noexcept;
547 static double pow(
double x,
double y);
660 static double sin(
double value);
665 static double sinh(
double value);
677 static double sqrt(
double value);
682 static double tan(
double value);
687 static double tanh(
double value);
static constexpr type_t epsilon
Represents the smallest positive type_t value greater than zero. This field is constant.
Definition box_floating_point.hpp:56
static constexpr type_t NaN
Represents not a number (NaN). This field is constant.
Definition box_floating_point.hpp:59
static constexpr type_t positive_infinity
Represents positive infinity. This field is constant.
Definition box_floating_point.hpp:65
static constexpr type_t negative_infinity
Represents negative infinity. This field is constant.
Definition box_floating_point.hpp:62
static constexpr type_t max_value
Represents the largest possible value of type_t. This field is constant.
Definition box_integer.hpp:67
static constexpr type_t min_value
Represents the smallest possible value of type_t. This field is constant.
Definition box_integer.hpp:70
Provides constants and static methods for trigonometric, logarithmic, and other common mathematical f...
Definition math.hpp:42
static slong min(slong a, slong b) noexcept
Returns the smaller of two 64-bit signed integers.
static int32 clamp(int32 value, int32 min, int32 max) noexcept
Returns value clamped to the inclusive range of min and max.
static constexpr double min_value
Represents the smallest possible value of double. This field is constant.
Definition math.hpp:69
static double abs(double value)
Returns the absolute value of a double-precision floating-point number.
static double degrees_to_radians(double degrees) noexcept
Convert degrees to radians.
static double sqrt(double value)
Returns the square root of a specified number.
static int16 abs(int16 value)
Returns the absolute value of a 16-bit signed integer.
static uint64 min(uint64 a, uint64 b) noexcept
Returns the smaller of two 64-bit unsigned integers.
static constexpr double infinity
Represents infinity. This field is constant.
Definition math.hpp:59
static int32 sign(slong value)
Returns a value indicating the sign of a 64-bit signed integer.
static double floor(double value)
Returns the largest integer less than or equal to the specified decimal number.
static int32 sign(decimal value)
Returns a value indicating the sign of a double-precision floating-point number.
static double round(double value)
Rounds a double-precision floating-point value to the nearest integral value.
static int64 big_mul(int32 a, int32 b)
Produces the full product of two 32-bit numbers.
static constexpr double positive_infinity
Represents positive infinity. This field is constant.
Definition math.hpp:87
static uint16 min(uint16 a, uint16 b) noexcept
Returns the smaller of two 16-bit unsigned integers.
static decimal abs(decimal value)
Returns the absolute value of a decimal number.
static int16 clamp(int16 value, int16 min, int16 max) noexcept
Returns value clamped to the inclusive range of min and max.
static double atan2(double y, double x)
Returns the angle whose tangent is the specified number.
static int32 sign(sbyte value)
Returns a value indicating the sign of an 8-bit signed integer.
static xtd::byte min(xtd::byte a, xtd::byte b) noexcept
Returns the smaller of two 8-bit unsigned integers.
static uint64 clamp(uint64 value, uint64 min, uint64 max) noexcept
Returns value clamped to the inclusive range of min and max.
static double round(double value, int32 decimals)
Rounds a decimal value to a specified number of fractional digits.
static int32 max(int32 a, int32 b) noexcept
Returns the larger of two 32-bit signed integers.
static sbyte max(sbyte a, sbyte b) noexcept
Returns the larger of two 8-bit signed integers.
static constexpr double tau
Represents the number of radians in one turn, specified by the constant, τ.
Definition math.hpp:90
static constexpr double negative_infinity
Represents negative infinity. This field is constant.
Definition math.hpp:79
static int16 min(int16 a, int16 b) noexcept
Returns the smaller of two 16-bit signed integers.
static float clamp(float value, float min, float max) noexcept
Returns value clamped to the inclusive range of min and max.
static uint64 max(uint64 a, uint64 b) noexcept
Returns the larger of two 64-bit unsigned integers.
static decimal truncate(decimal value)
Calculates the integral part of a specified double-precision floating-point number.
static double exp(double value)
Returns e raised to the specified power.
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 uint16 max(uint16 a, uint16 b) noexcept
Returns the larger of two 16-bit unsigned integers.
static double min(double a, double b) noexcept
Returns the smaller of two double single.
static xtd::ulong max(xtd::ulong a, xtd::ulong b) noexcept
Returns the larger of two 64-bit unsigned integers.
static double log(double a, double new_base)
Returns the logarithm of a specified number in a specified base.
static constexpr double e
Represents the natural logarithmic base, specified by the constant, e. This field is constant.
Definition math.hpp:49
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 uint32 min(uint32 a, uint32 b) noexcept
Returns the smaller of two 32-bit unsigned integers.
static double radians_to_degrees(double radians) noexcept
Convert radians to degrees.
static int16 max(int16 a, int16 b) noexcept
Returns the larger of two 16-bit signed integers.
static double tan(double value)
Returns the tangent of the specified angle.
static sbyte min(sbyte a, sbyte b) noexcept
Returns the smaller of two 8-bit signed integers.
static int64 min(int64 a, int64 b) noexcept
Returns the smaller of two 64-bit signed integers.
static int64 max(int64 a, int64 b) noexcept
Returns the larger of two 64-bit signed integers.
static double ieee_remainder(double dividend, double divisor)
Returns the remainder resulting from the division of a specified number by another specified number.
static int32 abs(int32 value)
Returns the absolute value of a 32-bit signed integer.
static bool is_infinity(double value) noexcept
Returns a value indicating whether the specified number evaluates to negative or positive infinity.
static decimal round(decimal value, int32 decimals)
Rounds a decimal value to a specified number of fractional digits.
static decimal clamp(decimal value, decimal min, decimal max) noexcept
Returns value clamped to the inclusive range of min and max.
static float abs(float value)
Returns the absolute value of a single-precision floating-point number.
static int32 sign(double value)
Returns a value indicating the sign of a double-precision floating-point number.
static double clamp(double value, double min, double max) noexcept
Returns value clamped to the inclusive range of min and max.
static double ceiling(double value)
Returns the smallest integer greater than or equal to the specified double-precision floating-point n...
static constexpr double epsilon
Represents the smallest positive Double value greater than zero. This field is constant.
Definition math.hpp:54
static int64 abs(int64 value)
Returns the absolute value of a 64-bit signed integer.
static double sin(double value)
Returns the sine of the specified angle.
static uint32 max(uint32 a, uint32 b) noexcept
Returns the larger of two 32-bit unsigned integers.
static double cos(double value)
Returns the cosine of the specified angle.
static decimal min(decimal a, decimal b) noexcept
Returns the smaller of two double single.
static int32 sign(float value)
Returns a value indicating the sign of a single-precision floating-point number.
static double pow(double x, double y)
Returns a specified number raised to the specified power.
static constexpr double NaN
Represents not a number (NaN). This field is constant.
Definition math.hpp:74
static sbyte abs(sbyte value)
Returns the absolute value of a 8-bit signed integer.
static uint32 clamp(uint32 value, uint32 min, uint32 max) noexcept
Returns value clamped to the inclusive range of min and max.
static double max(double a, double b) noexcept
Returns the larger of two double single.
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 par...
static double sinh(double value)
Returns the hyperbolic sine of the specified angle.
static uint16 clamp(uint16 value, uint16 min, uint16 max) noexcept
Returns value clamped to the inclusive range of min and max.
static xtd::byte max(xtd::byte a, xtd::byte b) noexcept
Returns the larger of two 8-bit unsigned integers.
static sbyte clamp(sbyte value, sbyte min, sbyte max) noexcept
Returns value clamped to the inclusive range of min and max.
static double truncate(double value)
Calculates the integral part of a specified double-precision floating-point number.
static decimal round(decimal value)
Rounds a double-precision floating-point value to the nearest integral value.
static int32 min(int32 a, int32 b) noexcept
Returns the smaller of two 32-bit signed integers.
static constexpr double max_value
Represents the largest possible value of double. This field is constant.
Definition math.hpp:64
static decimal ceiling(decimal value)
Returns the smallest integer greater than or equal to the specified double-precision floating-point n...
static decimal floor(decimal value)
Returns the largest integer less than or equal to the specified decimal number.
static int32 sign(int16 value)
Returns a value indicating the sign of a 16-bit signed integer.
static float min(float a, float b) noexcept
Returns the smaller of two single single.
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 par...
static int32 sign(int32 value)
Returns a value indicating the sign of a 32-bit signed integer.
static slong clamp(slong value, slong min, slong max) noexcept
Returns value clamped to the inclusive range of min and max.
static float max(float a, float b) noexcept
Returns the larger of two single single.
static slong max(slong a, slong b) noexcept
Returns the larger of two 64-bit signed integers.
static double log10(double value)
Returns the base 10 logarithm of a specified number.
static double cosh(double value)
Returns the hyperbolic cosine of the specified angle.
static constexpr double pi
Represents the ratio of the circumference of a circle to its diameter, specified by the constant,...
Definition math.hpp:82
static double log(double value)
Returns the natural (base e) logarithm of a specified number.
static int32 sign(int64 value)
Returns a value indicating the sign of a 64-bit signed integer.
static double tanh(double value)
Returns the hyperbolic tangent of the specified angle.
static bool is_positive_infinity(double value) noexcept
Returns a value indicating whether the specified number evaluates to positive infinity.
static double atan(double value)
Returns the angle whose tangent is the specified number.
static decimal max(decimal a, decimal b) noexcept
Returns the larger of two double single.
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 slong abs(slong value)
Returns the absolute value of a 64-bit signed integer.
static int64 clamp(int64 value, int64 min, int64 max) noexcept
Returns value clamped to the inclusive range of min and max.
static bool is_NaN(double value) noexcept
Returns a value indicating whether the specified number evaluates to not a number.
static xtd::ulong min(xtd::ulong a, xtd::ulong b) noexcept
Returns the smaller of two 64-bit unsigned integers.
static bool is_negative_infinity(double value) noexcept
Returns a value indicating whether the specified number evaluates to negative infinity.
Contains xtd::double_object alias.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::static_object class.
Contains xtd fundamental types.