@std/math.ms#
Import each required symbol with import Name from "@std/math.ms".
abs Function#
Returns the absolute value of a floating-point number.
fn abs(value: Float) -> Float:abs_int Function#
Returns the absolute value of an integer.
fn abs_int(value: Int) -> Int:acos Function#
Returns the inverse cosine in radians.
fn acos(value: Float) -> Float:asin Function#
Returns the inverse sine in radians.
fn asin(value: Float) -> Float:atan Function#
Returns the inverse tangent in radians.
fn atan(value: Float) -> Float:atan2 Function#
Returns the angle in radians for (x, y), preserving its quadrant.
fn atan2(y: Float, x: Float) -> Float:ceil Function#
Rounds upward to the nearest whole number.
fn ceil(value: Float) -> Float:cos Function#
Returns the cosine of an angle in radians.
fn cos(value: Float) -> Float:cosh Function#
Returns the hyperbolic cosine.
fn cosh(value: Float) -> Float:e Function#
Returns Euler’s number, the base of natural logarithms.
fn e() -> Float:exp Function#
Returns e raised to value.
fn exp(value: Float) -> Float:floor Function#
Rounds downward to the nearest whole number.
fn floor(value: Float) -> Float:hypot Function#
Returns the length of the hypotenuse for sides left and right.
fn hypot(left: Float, right: Float) -> Float:log Function#
Returns the natural logarithm.
fn log(value: Float) -> Float:log10 Function#
Returns the base-10 logarithm.
fn log10(value: Float) -> Float:log2 Function#
Returns the base-2 logarithm.
fn log2(value: Float) -> Float:max Function#
Returns the greater of two floating-point values.
fn max(left: Float, right: Float) -> Float:min Function#
Returns the lesser of two floating-point values.
fn min(left: Float, right: Float) -> Float:pi Function#
Returns π, the ratio of a circle’s circumference to its diameter.
fn pi() -> Float:pow Function#
Returns base raised to exponent.
fn pow(base: Float, exponent: Float) -> Float:remainder Function#
Returns the floating-point remainder after division.
fn remainder(left: Float, right: Float) -> Float:round Function#
Rounds to the nearest whole number, with ties toward positive infinity.
fn round(value: Float) -> Float:sin Function#
Returns the sine of an angle in radians.
fn sin(value: Float) -> Float:sinh Function#
Returns the hyperbolic sine.
fn sinh(value: Float) -> Float:sqrt Function#
Returns the non-negative square root.
fn sqrt(value: Float) -> Float:tan Function#
Returns the tangent of an angle in radians.
fn tan(value: Float) -> Float:tanh Function#
Returns the hyperbolic tangent.
fn tanh(value: Float) -> Float:truncate Function#
Truncates a value toward zero.
fn truncate(value: Float) -> Float: