abs_i64
pub fn abs_i64(x: i64) i64Absolute value of a 64-bit signed integer.
pub fn abs_i64(x: i64) i64Absolute value of a 64-bit signed integer.
pub fn min_i64(a: i64, b: i64) i64Minimum of two i64 values.
pub fn max_i64(a: i64, b: i64) i64Maximum of two i64 values.
pub fn clamp_i64(x: i64, lo: i64, hi: i64) i64Clamp `x` to [lo, hi].
pub fn sign_i64(x: i64) i64Sign of an i64: returns -1, 0, or 1.
pub fn rem(a: i64, b: i64) i64pub fn abs(x: i64) i64Absolute value
pub fn min(a: i64, b: i64) i64Min / Max
pub fn max(a: i64, b: i64) i64pub fn clamp(x: i64, lo: i64, hi: i64) i64Clamp value into [lo, hi]
pub fn pow(base: i64, exp: usize) i64Power (integer, simple loop)
pub fn gcd(a: i64, b: i64) i64Greatest Common Divisor (Euclidean)
pub fn lcm(a: i64, b: i64) i64Least Common Multiple
pub fn fmin(a: f64, b: f64) f64pub fn fmax(a: f64, b: f64) f64pub fn fabs(x: f64) f64pub fn fclamp(x: f64, lo: f64, hi: f64) f64pub fn floor(x: f64) f64pub fn ceil(x: f64) f64pub fn trunc(x: f64) f64pub fn fract(x: f64) f64pub fn sqrt(x: f64) f64Square root using Newton's method
pub fn fpow(base: f64, exp: usize) f64pub fn lerp(a: f64, b: f64, t: f64) f64Linear interpolation
pub fn clamp01(x: f64) f64Clamp a normalized scalar into [0, 1].
pub fn inverse_lerp(a: f64, b: f64, value: f64) f64Compute the interpolation factor of `value` between `a` and `b`.
pub fn remap(value: f64, in_lo: f64, in_hi: f64, out_lo: f64, out_hi: f64) f64Map a value from one range to another.
pub fn normalize_radians(angle: f64) f64Wrap radians into the half-open range [0, TAU).
pub fn normalize_degrees(angle: f64) f64Wrap degrees into the half-open range [0, 360).
pub fn shortest_angle_delta(from: f64, to: f64) f64Return the shortest signed angular difference from `from` to `to`, in radians.
pub fn is_even(x: i64) boolIs this number even?
pub fn is_odd(x: i64) boolIs this number odd?
pub fn approx_eq(a: f64, b: f64, eps: f64) boolCheck approximate equality
pub fn exp(x: f64) f64Exponential function (e^x) using Taylor series
pub fn logarithm(x: f64) f64Natural logarithm (ln(x)) using Newton's method
pub fn log10(x: f64) f64Base-10 logarithm
pub fn log2(x: f64) f64Base-2 logarithm
pub fn sin(x: f64) f64Sine function using Taylor series
pub fn cos(x: f64) f64Cosine function
pub fn tan(x: f64) f64Tangent function
pub fn asin(x: f64) f64Arcsine (inverse sine) using Newton's method
pub fn acos(x: f64) f64Arccosine (inverse cosine)
pub fn atan(x: f64) f64Arctangent (inverse tangent) using series expansion
pub fn atan2(y: f64, x: f64) f64Two-argument arctangent (atan2)
pub fn sinh(x: f64) f64Hyperbolic sine
pub fn cosh(x: f64) f64Hyperbolic cosine
pub fn tanh(x: f64) f64Hyperbolic tangent
pub fn to_radians(degrees: f64) f64Convert degrees to radians
pub fn to_degrees(radians: f64) f64Convert radians to degrees
pub fn round(x: f64) f64Round to nearest integer
pub fn pow_f64(base: f64, exponent: f64) f64Compute x^y for floating point
pub fn cbrt(x: f64) f64Cube root
pub fn hypot(x: f64, y: f64) f64Hypotenuse (sqrt(x^2 + y^2))
pub fn copysign(mag: f64, sign: f64) f64Copy sign from one number to another
pub fn fma(a: f64, b: f64, c: f64) f64Fused multiply-add: (a * b) + c