cowry 0.1.0

A micro-library for precise currency math and rounding control in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::{Owo, RoundingMode};



pub trait BatchOperations {
    fn multiply_all(&self, scalar: f64) -> Vec<Owo>;
    fn divide_all(&self, scalar: f64) -> Vec<Owo>;
    fn percentage_all(&self, percent: f64) -> Vec<Owo>;
    fn multiply_all_with_mode(&self, scalar: f64, mode: RoundingMode) -> Vec<Owo>;
    fn divide_all_with_mode(&self, scalar: f64, mode: RoundingMode) -> Vec<Owo>;
    fn percentage_all_with_mode(&self, percent: f64, mode: RoundingMode) -> Vec<Owo>;
}