cowry 0.1.0

A micro-library for precise currency math and rounding control in Rust.
Documentation
1
2
3
4
5
6
#[derive(Debug, Clone, Copy)]
pub enum RoundingMode {
    Nearest, // .round() | Rounds to nearest, ties away from zero | 2.625 → 2.63
    Floor,   // .floor() | Always rounds down | 2.625 → 2.62, -2.625 → -2.63
    Ceil,    // .ceil()  | Always rounds up | 2.625 → 2.63, -2.625 → -2.62
}