Skip to main content

Module math

Module math 

Source
Expand description

std::math - mathematical functions and the std::math::consts submodule.

Most functions accept both int and float; mixed types are handled per-function. pow uses with_raw_function to handle (int, int), (int, float), (float, float), and (float, int) combinations manually.

Modulesยง

abs ๐Ÿ”’
acos ๐Ÿ”’
asin ๐Ÿ”’
atan ๐Ÿ”’
atan2 ๐Ÿ”’
ceil ๐Ÿ”’
clamp ๐Ÿ”’
constants
std::math::consts - mathematical constants from std::f64::consts.
cos ๐Ÿ”’
degrees ๐Ÿ”’
exp ๐Ÿ”’
factorial ๐Ÿ”’
fibonacci ๐Ÿ”’
floor ๐Ÿ”’
gcd ๐Ÿ”’
hypot ๐Ÿ”’
is_prime ๐Ÿ”’
lcm ๐Ÿ”’
lerp ๐Ÿ”’
log ๐Ÿ”’
log2 ๐Ÿ”’
log10 ๐Ÿ”’
map_range ๐Ÿ”’
max ๐Ÿ”’
min ๐Ÿ”’
modulo ๐Ÿ”’
power ๐Ÿ”’
radians ๐Ÿ”’
round ๐Ÿ”’
sign ๐Ÿ”’
sin ๐Ÿ”’
sqrt ๐Ÿ”’
tan ๐Ÿ”’

Constantsยง

KEYWORDS

Functionsยง

module