math
Library containing more advanced mathematical operations.
Types
std::math::AccumulateOperation
std::math::AccumulateOperation
Options to use with the std::math::accumulate
function.
std::mem::AlignTo
std::mem::AlignTo
Aligns the cursor to the given alignment
<alignment>
: The alignment to align to
std::mem::Bytes
std::mem::Bytes
A type representing a sequence of bytes without any specific meaning
<Size>
: The size of the sequence
std::mem::Endian
std::mem::Endian
The endianness of a value
std::mem::MagicSearch
std::mem::MagicSearch
Searches for a sequence of bytes and places the given type at that address
<Magic>
: The magic sequence to search for<T>
: The type to place at the address
std::mem::Reinterpreter
std::mem::Reinterpreter
Reinterprets a value as a different one
<From>
: The type to reinterpret from<To>
: The type to reinterpret to
std::mem::Section
std::mem::Section
A Handle for a custom Section
Functions
std::math::min
std::math::min
Compares the values a
and b
with each other and returns the smaller of the two
a
: First valueb
: Second valuereturn
:a
ifa
is smaller thanb
, otherwiseb
std::math::max
std::math::max
Compares the values a
and b
with each other and returns the bigger of the two
a
: First valueb
: Second valuereturn
:a
ifa
is bigger thanb
, otherwiseb
std::math::clamp
std::math::clamp
Clamps the value of x
between min
and max
.
x
: Valuemin
: Minimum valuemax
: Maximum valuereturn
:min
ifx
is smaller thanmin
,max
ifx
is bigger thanmax
,x
otherwise
std::math::abs
std::math::abs
Returns the absolute value of x
.
x
: Valuereturn
:x
ifx
is positive,-x
otherwise
std::math::sign
std::math::sign
Returns the sign of x
.
x
: Valuereturn
:1
ifx
is positive,-1
ifx
is negative,0
ifx
is zero
std::math::copy_sign
std::math::copy_sign
Copies the sign of y
to x
.
x
: Valuey
: Valuereturn
:x
ify
is positive,-x
ify
is negative
std::math::factorial
std::math::factorial
Calculates the factorial of x
.
x
: Valuereturn
: Factorial ofx
std::math::comb
std::math::comb
Calculates the binomial coefficient of n
and k
.
n
: Valuek
: Valuereturn
: Binomial coefficient ofn
andk
std::math::perm
std::math::perm
Calculates the permutation of n
and k
.
n
: Valuek
: Valuereturn
: Permutation ofn
andk
std::math::floor
std::math::floor
Floors the value of value
.
value
: Valuereturn
:value
floored
std::math::ceil
std::math::ceil
Ceils the value of value
.
value
: Valuereturn
:value
ceiled
std::math::round
std::math::round
Rounds the value of value
.
value
: Valuereturn
:value
rounded
std::math::trunc
std::math::trunc
Truncates the value of value
.
value
: Valuereturn
:value
truncated
std::math::log10
std::math::log10
Calculates the logarithm of value
with base 10.
value
: Valuereturn
: Logarithm ofvalue
with base 10
std::math::log2
std::math::log2
Calculates the logarithm of value
with base 2.
value
: Valuereturn
: Logarithm ofvalue
with base 2
std::math::ln
std::math::ln
Calculates the natural logarithm of value
.
value
: Valuereturn
: Logarithm ofvalue
with basee
std::math::fmod
std::math::fmod
Calculates the floating point modulus of value
.
value
: Valuereturn
: Floating point modulus ofvalue
std::math::pow
std::math::pow
Calculates the value of base
raised to the power of exp
.
base
: Baseexp
: Exponentreturn
:base
raised to the power ofexp
std::math::exp
std::math::exp
Calculates the value of the natural number e
raised to the power of value
.
value
: Exponentreturn
:e
raised to the power ofvalue
std::math::sqrt
std::math::sqrt
Calculates the square root of value
.
value
: Valuereturn
: Square root ofvalue
std::math::cbrt
std::math::cbrt
Calculates the cubic root of value
.
value
: Valuereturn
: Cubic root ofvalue
std::math::sin
std::math::sin
Calculates the sine of value
.
value
: Angle value in radiansreturn
: Sine ofvalue
std::math::cos
std::math::cos
Calculates the cosine of value
.
value
: Angle value in radiansreturn
: Cosine ofvalue
std::math::tan
std::math::tan
Calculates the tangent of value
.
value
: Angle value in radiansreturn
: Tangent ofvalue
std::math::asin
std::math::asin
Calculates the arc sine of value
.
value
: Angle value in radiansreturn
: Arc sine ofvalue
std::math::acos
std::math::acos
Calculates the arc cosine of value
.
value
: Valuereturn
: Arc cosine ofvalue
in radians
std::math::atan
std::math::atan
Calculates the arc tangent of value
.
value
: Valuereturn
: Arc tangent ofvalue
in radians between-pi/2
andpi/2
std::math::atan2
std::math::atan2
Calculates the arc tangent of value
.
y
: Value representing the proportion of the y-coordinatex
: Value representing the proportion of the x-coordinate.return
: Arc tangent ofvalue
in radians between-pi
andpi
std::math::sinh
std::math::sinh
Calculates the hyperbolic sine of value
.
value
: Angle value in radiansreturn
: Hyperbolic sine ofvalue
std::math::cosh
std::math::cosh
Calculates the hyperbolic cosine of value
.
value
: Angle value in radiansreturn
: Hyperbolic cosine ofvalue
std::math::tanh
std::math::tanh
Calculates the hyperbolic tangent of value
.
value
: Angle value in radiansreturn
: Hyperbolic tangent ofvalue
std::math::asinh
std::math::asinh
Calculates the arc hyperbolic sine of value
.
value
: Valuereturn
: Arc hyperbolic sine ofvalue
std::math::acosh
std::math::acosh
Calculates the arc hyperbolic cosine of value
.
value
: Valuereturn
: Arc hyperbolic cosine ofvalue
std::math::atanh
std::math::atanh
Calculates the arc hyperbolic tangent of value
.
value
: Valuereturn
: Arc hyperbolic tangent ofvalue
std::math::accumulate
std::math::accumulate
Calculates the sum of all values in the specified memory range.
start
: Start addressend
: End addressvalueSize
: Size of each value in bytes[section]
: Section to use[operation]
: Operation to use. Defaults to addition[endian]
: Endianness to use. Defaults to nativereturn
: Sum of all values in the specified memory range
Last updated