Crate hexga_number
Source - map_on
- A powerful macro to impl other macros for the given types.
- map_on_float
f32
, f64
- map_on_integer
- (
i8
, i16
, i32
, i64
, isize
) + (u8
, u16
, u32
, u64
, usize
) - map_on_integer_signed
i8
, i16
, i32
, i64
, isize
- map_on_integer_unsigned
u8
, u16
, u32
, u64
, usize
- map_on_number
- (
i8
, i16
, i32
, i64
, isize
) + (u8
, u16
, u32
, u64
, usize
) + (f32
, f64
) - map_on_number_and_bool
- (
i8
, i16
, i32
, i64
, isize
) + (u8
, u16
, u32
, u64
, usize
) + (f32
, f64
) + (bool
)
- OverflowBehavior
- ArithmeticNegative
- BitArithmetic
- For every type that support bit based operation (and
&
, or |
, xor ^
, not !
, shift <<
/ >>
…) - Floating
- fX
- Half
- Define the
0.5
representation - Increase
- The
+1
operation - Integer
- uX or iX
- IntegerSigned
- iX
- IntegerUnsigned
- uX
- MaxValue
- MinValue
- MinusOne
- Define the
-1
representation - NaNValue
- Define the Not a Number (NaN) representation
- Number
- +, -, *, /, %, 0, 1, ==, >=, min val, max val
- NumberArithmetic
- +, -, *, /, %, 0
- NumberAttibute
- NumberNegative
- fX or iX
- One
- Define the
1
representation : The neutral element of the multiplication such that x * X::ONE = x
- UnitArithmetic
- +, -, 0
- Zero
- Define the
0
representation : The absorbing element of the multiplication such that x * X::ZERO = X::ZERO
- half
- minus_one
- one
- zero