percent-rs

Crates.iopercent-rs
lib.rspercent-rs
version0.1.1
sourcesrc
created_at2024-07-04 15:55:37.669321
updated_at2024-07-23 19:22:04.849232
descriptionSimple crate for percentages of integers and floats
homepage
repositoryhttps://github.com/ontometrics/percent-rs
max_upload_size
id1291788
size8,069
(kristencornelsen)

documentation

README

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%
}
Commit count: 0

cargo fmt