2 releases
0.1.1 | Jul 23, 2024 |
---|---|
0.1.0 | Jul 4, 2024 |
#5 in #percent
35 downloads per month
8KB
138 lines
Percent-RS
Simple implementation of a percentage that you can add, subtract, multiply, and divide.
Usage
use percent_rs::Percentage;
fn main() {
let percent = Percentage::from(50);
let percent_decimal = Percentage::from_decimal(50.5);
println!("{}", percent); // 50%
println!("{}", percent_decimal); // 55.5%
}
Dependencies
~185KB