Module orml_traits::arithmetic

source ·

Traits

Numbers which have upper and lower bounds
Performs addition that returns None instead of wrapping around on overflow.
Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.
Performs multiplication that returns None instead of wrapping around on underflow or overflow.
Performs a left shift that returns None on shifts larger than the type width.
Performs a right shift that returns None on shifts larger than the type width.
Performs subtraction that returns None instead of wrapping around on underflow.
Defines a multiplicative identity element for Self.
Useful functions for signed numbers (i.e. numbers that can be negative).
A meta trait for arithmetic.
Defines an additive identity element for Self.