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."
61 static constexpr double e = 2.7182818284590452354;
64 static constexpr double pi = 3.14159265358979323846;
67 static constexpr double tau = 2.7182818284590451;
80 [[nodiscard]]
static auto abs(
double value) -> double;
114 [[nodiscard]]
static auto acos(
double value) -> double;
119 [[nodiscard]]
static auto asin(
double value) -> double;
124 [[nodiscard]]
static auto atan(
double value) -> double;
142 [[nodiscard]]
static auto atan2(
double y,
double x) -> double;
157 [[nodiscard]]
static double ceiling(
double value);
176 [[nodiscard]]
static auto clamp(
double value,
double min,
double max)
noexcept -> double;
241 [[nodiscard]]
static auto cos(
double value) -> double;
246 [[nodiscard]]
static auto cosh(
double value) -> double;
269 [[nodiscard]]
static auto exp(
double value) -> double;
278 [[nodiscard]]
static auto floor(
double value) -> double;
286 [[nodiscard]]
static auto ieee_remainder(
double dividend,
double divisor) -> double;
300 [[nodiscard]]
static auto log(
double value) -> double;
322 [[nodiscard]]
static auto log(
double a,
double new_base) -> double;
336 [[nodiscard]]
static auto log10(
double value) -> double;
352 [[nodiscard]]
static auto max(
double a,
double b)
noexcept -> double;
418 [[nodiscard]]
static auto min(
double a,
double b)
noexcept -> double;
494 [[nodiscard]]
static auto pow(
double x,
double y) -> double;
513 [[nodiscard]]
static auto round(
double value) -> double;
607 [[nodiscard]]
static auto sin(
double value) -> double;
612 [[nodiscard]]
static auto sinh(
double value) -> double;
624 [[nodiscard]]
static auto sqrt(
double value) -> double;
629 [[nodiscard]]
static auto tan(
double value) -> double;
634 [[nodiscard]]
static auto tanh(
double value) -> double;
655 [[nodiscard]]
static auto truncate(
double value) -> double;
664 [[deprecated(
"Replaced by xtd::double_object::epsilon - Will be removed in version 1.2.0.")]]
669 [[deprecated(
"Replaced by xtd::double_object::positive_infinity - Will be removed in version 1.2.0.")]]
674 [[deprecated(
"Replaced by xtd::double_object::max_value - Will be removed in version 1.2.0.")]]
679 [[deprecated(
"Replaced by xtd::double_object::min_value - Will be removed in version 1.2.0.")]]
684 [[deprecated(
"Replaced by xtd::double_object::NaN - Will be removed in version 1.2.0.")]]
689 [[deprecated(
"Replaced by xtd::double_object::negative_infinity - Will be removed in version 1.2.0.")]]
694 [[deprecated(
"Replaced by xtd::double_object::positive_infinity - Will be removed in version 1.2.0.")]]
705 [[deprecated(
"Replaced by xtd::double_object::is_infinity - Will be removed in version 1.2.0.")]]
706 [[nodiscard]]
static auto is_infinity(
double value)
noexcept -> bool;
712 [[deprecated(
"Replaced by xtd::double_object::is_negative_infinity - Will be removed in version 1.2.0.")]]
719 [[deprecated(
"Replaced by xtd::double_object::is_positive_infinity - Will be removed in version 1.2.0.")]]
726 [[deprecated(
"Replaced by xtd::double_object::is_NaN - Will be removed in version 1.2.0.")]]
727 [[nodiscard]]
static auto is_NaN(
double value)
noexcept -> bool;
static constexpr double epsilon
Definition box_floating_point.hpp:57
static constexpr double min_value
Definition box_floating_point.hpp:63
static constexpr double NaN
Definition box_floating_point.hpp:66
static constexpr double max_value
Definition box_floating_point.hpp:60
static constexpr double positive_infinity
Definition box_floating_point.hpp:72
static constexpr double negative_infinity
Definition box_floating_point.hpp:69
Provides constants and static methods for trigonometric, logarithmic, and other common mathematical f...
Definition math.hpp:54
static auto truncate(double value) -> double
Calculates the integral part of a specified double-precision floating-point number.
static auto abs(xtd::decimal value) -> xtd::decimal
Returns the absolute value of a decimal number.
static auto min(xtd::int64 a, xtd::int64 b) noexcept -> xtd::int64
Returns the smaller of two 64-bit signed integers.
static auto max(xtd::byte a, xtd::byte b) noexcept -> xtd::byte
Returns the larger of two 8-bit unsigned integers.
static constexpr auto min_value
Represents the smallest possible value of double. This field is constant.
Definition math.hpp:680
static auto abs(xtd::slong value) -> xtd::slong
Returns the absolute value of a 64-bit signed integer.
static auto atan(double value) -> double
Returns the angle whose tangent is the specified number.
static auto sign(xtd::slong value) -> xtd::int32
Returns a value indicating the sign of a 64-bit signed integer.
static auto sign(xtd::int64 value) -> xtd::int32
Returns a value indicating the sign of a 64-bit signed integer.
static auto sqrt(double value) -> double
Returns the square root of a specified number.
static auto abs(xtd::sbyte value) -> xtd::sbyte
Returns the absolute value of a 8-bit signed integer.
static auto round(double value) -> double
Rounds a double-precision floating-point value to the nearest integral value.
static auto clamp(xtd::int64 value, xtd::int64 min, xtd::int64 max) noexcept -> xtd::int64
Returns value clamped to the inclusive range of min and max.
static auto min(xtd::sbyte a, xtd::sbyte b) noexcept -> xtd::sbyte
Returns the smaller of two 8-bit signed integers.
static auto clamp(xtd::byte value, xtd::byte min, xtd::byte max) noexcept -> xtd::byte
Returns value clamped to the inclusive range of min and max.
static auto big_mul(xtd::int32 a, xtd::int32 b) -> xtd::int64
Produces the full product of two 32-bit numbers.
static auto clamp(xtd::single value, xtd::single min, xtd::single max) noexcept -> xtd::single
Returns value clamped to the inclusive range of min and max.
static auto clamp(xtd::uint64 value, xtd::uint64 min, xtd::uint64 max) noexcept -> xtd::uint64
Returns value clamped to the inclusive range of min and max.
static auto clamp(xtd::int32 value, xtd::int32 min, xtd::int32 max) noexcept -> xtd::int32
Returns value clamped to the inclusive range of min and max.
static auto sign(xtd::single value) -> xtd::int32
Returns a value indicating the sign of a single-precision floating-point number.
static auto max(xtd::uint64 a, xtd::uint64 b) noexcept -> xtd::uint64
Returns the larger of two 64-bit unsigned integers.
static constexpr auto negative_infinity
Represents negative infinity. This field is constant.
Definition math.hpp:690
static auto tan(double value) -> double
Returns the tangent of the specified angle.
static auto min(xtd::decimal a, xtd::decimal b) noexcept -> xtd::decimal
Returns the smaller of two double single.
static constexpr auto infinity
Represents infinity. This field is constant.
Definition math.hpp:670
static auto round(xtd::decimal value) -> xtd::decimal
Rounds a double-precision floating-point value to the nearest integral value.
static auto sin(double value) -> double
Returns the sine of the specified angle.
static auto sign(xtd::decimal value) -> xtd::int32
Returns a value indicating the sign of a double-precision floating-point number.
static auto clamp(xtd::int16 value, xtd::int16 min, xtd::int16 max) noexcept -> xtd::int16
Returns value clamped to the inclusive range of min and max.
static auto ieee_remainder(double dividend, double divisor) -> double
Returns the remainder resulting from the division of a specified number by another specified number.
static auto round(xtd::decimal value, xtd::int32 decimals) -> xtd::decimal
Rounds a xtd::decimal value to a specified number of fractional digits.
static auto round(double value, xtd::int32 decimals) -> double
Rounds a xtd::decimal value to a specified number of fractional digits.
static auto min(xtd::int32 a, xtd::int32 b) noexcept -> xtd::int32
Returns the smaller of two 32-bit signed integers.
static constexpr double tau
Represents the number of radians in one turn, specified by the constant, τ.
Definition math.hpp:67
static auto tanh(double value) -> double
Returns the hyperbolic tangent of the specified angle.
static auto exp(double value) -> double
Returns e raised to the specified power.
static auto log10(double value) -> double
Returns the base 10 logarithm of a specified number.
static auto abs(xtd::single value) -> xtd::single
Returns the absolute value of a single-precision floating-point number.
static auto max(double a, double b) noexcept -> double
Returns the larger of two double single.
static auto max(xtd::ulong a, xtd::ulong b) noexcept -> xtd::ulong
Returns the larger of two 64-bit unsigned integers.
static constexpr double e
Represents the natural logarithmic base, specified by the constant, e. This field is constant.
Definition math.hpp:61
static auto asin(double value) -> double
Returns the angle whose sine is the specified number.
static auto max(xtd::int64 a, xtd::int64 b) noexcept -> xtd::int64
Returns the larger of two 64-bit signed integers.
static auto is_negative_infinity(double value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to negative infinity.
static auto radians_to_degrees(double radians) noexcept -> double
Convert radians to degrees.
static auto clamp(double value, double min, double max) noexcept -> double
Returns value clamped to the inclusive range of min and max.
static auto cosh(double value) -> double
Returns the hyperbolic cosine of the specified angle.
static auto div_rem(xtd::int32 dividend, xtd::int32 divisor, xtd::int32 &remainder) -> xtd::int32
Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output par...
static auto div_rem(xtd::int64 dividend, xtd::int64 divisor, xtd::int64 &remainder) -> xtd::int64
Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output par...
static auto floor(xtd::decimal value) -> xtd::decimal
Returns the largest integer less than or equal to the specified decimal number.
static auto sign(double value) -> xtd::int32
Returns a value indicating the sign of a double-precision floating-point number.
static constexpr auto epsilon
Represents the smallest positive Double value greater than zero. This field is constant.
Definition math.hpp:665
static auto sign(xtd::int32 value) -> xtd::int32
Returns a value indicating the sign of a 32-bit signed integer.
static double ceiling(double value)
Returns the smallest integer greater than or equal to the specified double-precision floating-point n...
static auto floor(double value) -> double
Returns the largest integer less than or equal to the specified decimal number.
static auto clamp(xtd::sbyte value, xtd::sbyte min, xtd::sbyte max) noexcept -> xtd::sbyte
Returns value clamped to the inclusive range of min and max.
static auto min(xtd::byte a, xtd::byte b) noexcept -> xtd::byte
Returns the smaller of two 8-bit unsigned integers.
static auto abs(double value) -> double
Returns the absolute value of a double-precision floating-point number.
static auto abs(xtd::int64 value) -> xtd::int64
Returns the absolute value of a 64-bit signed integer.
static auto max(xtd::int16 a, xtd::int16 b) noexcept -> xtd::int16
Returns the larger of two 16-bit signed integers.
static auto cos(double value) -> double
Returns the cosine of the specified angle.
static auto clamp(xtd::slong value, xtd::slong min, xtd::slong max) noexcept -> xtd::slong
Returns value clamped to the inclusive range of min and max.
static auto min(xtd::slong a, xtd::slong b) noexcept -> xtd::slong
Returns the smaller of two 64-bit signed integers.
static auto is_infinity(double value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to negative or positive infinity.
static auto min(xtd::uint64 a, xtd::uint64 b) noexcept -> xtd::uint64
Returns the smaller of two 64-bit unsigned integers.
static auto log(double a, double new_base) -> double
Returns the logarithm of a specified number in a specified base.
static auto log(double value) -> double
Returns the natural (base e) logarithm of a specified number.
static auto clamp(xtd::ulong value, xtd::ulong min, xtd::ulong max) noexcept -> xtd::ulong
Returns value clamped to the inclusive range of min and max.
static auto pow(double x, double y) -> double
Returns a specified number raised to the specified power.
static constexpr auto positive_infinity
Represents positive infinity. This field is constant.
Definition math.hpp:695
static auto atan2(double y, double x) -> double
Returns the angle whose tangent is the specified number.
static auto is_NaN(double value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to not a number.
static auto clamp(xtd::decimal value, xtd::decimal min, xtd::decimal max) noexcept -> xtd::decimal
Returns value clamped to the inclusive range of min and max.
static auto max(xtd::uint32 a, xtd::uint32 b) noexcept -> xtd::uint32
Returns the larger of two 32-bit unsigned integers.
static auto max(xtd::uint16 a, xtd::uint16 b) noexcept -> xtd::uint16
Returns the larger of two 16-bit unsigned integers.
static auto max(xtd::sbyte a, xtd::sbyte b) noexcept -> xtd::sbyte
Returns the larger of two 8-bit signed integers.
static auto min(xtd::uint16 a, xtd::uint16 b) noexcept -> xtd::uint16
Returns the smaller of two 16-bit unsigned integers.
static auto sign(xtd::int16 value) -> xtd::int32
Returns a value indicating the sign of a 16-bit signed integer.
static auto max(xtd::decimal a, xtd::decimal b) noexcept -> xtd::decimal
Returns the larger of two double single.
static auto max(xtd::single a, xtd::single b) noexcept -> xtd::single
Returns the larger of two single single.
static auto max(xtd::int32 a, xtd::int32 b) noexcept -> xtd::int32
Returns the larger of two 32-bit signed integers.
static auto abs(xtd::int32 value) -> xtd::int32
Returns the absolute value of a 32-bit signed integer.
static constexpr auto max_value
Represents the largest possible value of double. This field is constant.
Definition math.hpp:675
static auto min(double a, double b) noexcept -> double
Returns the smaller of two double single.
static constexpr auto NaN
Represents not a number (NaN). This field is constant.
Definition math.hpp:685
static auto ceiling(xtd::decimal value) -> xtd::decimal
Returns the smallest integer greater than or equal to the specified double-precision floating-point n...
static auto min(xtd::single a, xtd::single b) noexcept -> xtd::single
Returns the smaller of two single single.
static constexpr double pi
Represents the ratio of the circumference of a circle to its diameter, specified by the constant,...
Definition math.hpp:64
static auto acos(double value) -> double
Returns the angle whose cosine is the specified number.
static auto abs(xtd::int16 value) -> xtd::int16
Returns the absolute value of a 16-bit signed integer.
static auto min(xtd::int16 a, xtd::int16 b) noexcept -> xtd::int16
Returns the smaller of two 16-bit signed integers.
static auto sign(xtd::sbyte value) -> xtd::int32
Returns a value indicating the sign of an 8-bit signed integer.
static auto min(xtd::uint32 a, xtd::uint32 b) noexcept -> xtd::uint32
Returns the smaller of two 32-bit unsigned integers.
static auto min(xtd::ulong a, xtd::ulong b) noexcept -> xtd::ulong
Returns the smaller of two 64-bit unsigned integers.
static auto sinh(double value) -> double
Returns the hyperbolic sine of the specified angle.
static auto degrees_to_radians(double degrees) noexcept -> double
Convert degrees to radians.
static auto max(xtd::slong a, xtd::slong b) noexcept -> xtd::slong
Returns the larger of two 64-bit signed integers.
static auto truncate(xtd::decimal value) -> xtd::decimal
Calculates the integral part of a specified double-precision floating-point number.
static auto is_positive_infinity(double value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to positive infinity.
static auto clamp(xtd::uint32 value, xtd::uint32 min, xtd::uint32 max) noexcept -> xtd::uint32
Returns value clamped to the inclusive range of min and max.
static auto clamp(xtd::uint16 value, xtd::uint16 min, xtd::uint16 max) noexcept -> xtd::uint16
Returns value clamped to the inclusive range of min and max.
Contains xtd::double_ type.
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:38
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
std::int8_t sbyte
Represents a 8-bit signed integer.
Definition sbyte.hpp:23
__ulong__ ulong
Represents a 32-bit or 64-bit unsigned integer.
Definition ulong.hpp:27
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
std::uint16_t uint16
Represents a 16-bit unsigned integer.
Definition uint16.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::int16_t int16
Represents a 16-bit signed integer.
Definition int16.hpp:23
std::uint64_t uint64
Represents a 64-bit unsigned integer.
Definition uint64.hpp:23
std::uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
float single
Represents a single-precision floating-point number.
Definition single.hpp:23
@ a
The A key.
Definition console_key.hpp:88
@ y
The Y key.
Definition console_key.hpp:136
@ b
The B key.
Definition console_key.hpp:90
@ x
The X key.
Definition console_key.hpp:134
Contains xtd::int16 type.
Contains xtd::int32 type.
Contains xtd::int64 type.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::sbyte type.
Contains xtd::single type.
Contains xtd::single_object alias.
Contains xtd::slong type.
Contains xtd::static_object class.
Contains xtd::uint16 type.
Contains xtd::uint32 type.
Contains xtd::uint64 type.
Contains xtd::ulong type.