pax_value::numeric
Enums
Numeric
Numeric type wrapper for PAXEL and runtime polymorphic numeric operations. This broad polyfill specifically enables terse numeric operations within expressions, without the overhead of explicit typing or numeric microsyntax.
Variants
I8(i8)
I16(i16)
I32(i32)
I64(i64)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
F64(f64)
F32(f32)
ISize(isize)
USize(usize)
Implementations
is_float
pub fn is_float(&self) -> bool
Returns true when this value is stored as a floating-point number.
max
pub fn max(self, other: Self) -> Self
Returns the larger of two numeric values.
min
pub fn min(self, other: Self) -> Self
Returns the smaller of two numeric values.
pow
pub fn pow(self, exp: Self) -> Self
Raises this number to exp, preserving integer arithmetic when both sides are integral.
to_float
pub fn to_float(&self) -> f64
Coerces this numeric value to f64.
to_int
pub fn to_int(&self) -> i64
Coerces this numeric value to i64.