Module calc

Source
Expand description

Calculations and processing of numeric values.

Structs§

ToAbs
A value of which the absolute value can be taken.

Enums§

AngleLike
A value that can be passed to a trigonometric function.
DecNum
A value which can be passed to functions that work with integers, floats, and decimals.
Num
A value which can be passed to functions that work with integers and floats.

Functions§

abs
Calculates the absolute value of a numeric value.
acos
Calculates the arccosine of a number.
asin
Calculates the arcsine of a number.
atan
Calculates the arctangent of a number.
atan2
Calculates the four-quadrant arctangent of a coordinate.
binom
Calculates a binomial coefficient.
ceil
Rounds a number up to the nearest integer.
clamp
Clamps a number between a minimum and maximum value.
cos
Calculates the cosine of an angle.
cosh
Calculates the hyperbolic cosine of a hyperbolic angle.
div_euclid
Performs euclidean division of two numbers.
even
Determines whether an integer is even.
exp
Raises a value to some exponent of e.
fact
Calculates the factorial of a number.
floor
Rounds a number down to the nearest integer.
fract
Returns the fractional part of a number.
gcd
Calculates the greatest common divisor of two integers.
lcm
Calculates the least common multiple of two integers.
ln
Calculates the natural logarithm of a number.
log
Calculates the logarithm of a number.
max
Determines the maximum of a sequence of values.
min
Determines the minimum of a sequence of values.
module
A module with calculation definitions.
norm
Calculates the p-norm of a sequence of values.
odd
Determines whether an integer is odd.
perm
Calculates a permutation.
pow
Raises a value to some exponent.
quo
Calculates the quotient (floored division) of two numbers.
rem
Calculates the remainder of two numbers.
rem_euclid
This calculates the least nonnegative remainder of a division.
root
Calculates the real nth root of a number.
round
Rounds a number to the nearest integer away from zero.
sin
Calculates the sine of an angle.
sinh
Calculates the hyperbolic sine of a hyperbolic angle.
sqrt
Calculates the square root of a number.
tan
Calculates the tangent of an angle.
tanh
Calculates the hyperbolic tangent of an hyperbolic angle.
trunc
Returns the integer part of a number.