pub type Fixed = FixedPoint<FixedInner, U18>;
Expand description
Basic type representing assets quantity.
MAX = (2 ** (BITS_COUNT - 1) - 1) / 10 ** PRECISION = = (2 ** (128 - 1) - 1) / 1e18 = = 170_141_183_460_469_231_731.687_303_715_884_105_727 ~ ~ 1.7e20 ERROR_MAX = 0.5 / (10 ** PRECISION) = = 0.5 / 1e18 = = 5e-19
Trait Implementations§
source§impl Add<FixedWrapper> for Fixed
impl Add<FixedWrapper> for Fixed
§type Output = FixedWrapper
type Output = FixedWrapper
The resulting type after applying the
+
operator.source§impl Div<FixedWrapper> for Fixed
impl Div<FixedWrapper> for Fixed
§type Output = FixedWrapper
type Output = FixedWrapper
The resulting type after applying the
/
operator.source§impl Mul<FixedWrapper> for Fixed
impl Mul<FixedWrapper> for Fixed
§type Output = FixedWrapper
type Output = FixedWrapper
The resulting type after applying the
*
operator.source§impl<T> Mul<SwapAmount<T>> for Fixedwhere
T: Copy + RoundingMul<Output = T> + Into<Fixed> + From<Fixed>,
impl<T> Mul<SwapAmount<T>> for Fixedwhere T: Copy + RoundingMul<Output = T> + Into<Fixed> + From<Fixed>,
§type Output = SwapAmount<T>
type Output = SwapAmount<T>
The resulting type after applying the
*
operator.source§impl Sub<FixedWrapper> for Fixed
impl Sub<FixedWrapper> for Fixed
§type Output = FixedWrapper
type Output = FixedWrapper
The resulting type after applying the
-
operator.