ancdec 0.3.2

Fast, precise anchored decimal with independent integer/fraction fields (u64: 19+19, u128: 38+38 digits)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Rounding modes for decimal operations.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum RoundMode {
    /// Round toward negative infinity.
    Floor,
    /// Round toward positive infinity.
    Ceil,
    /// Round toward zero (truncate).
    Truncate,
    /// Round half away from zero (>= 0.5 rounds up).
    HalfUp,
    /// Round half toward zero (> 0.5 rounds up).
    HalfDown,
    /// Banker's rounding: half rounds to nearest even.
    HalfEven,
    /// Return the fractional part only.
    Fract,
}