percent-rs 0.1.1

Simple crate for percentages of integers and floats
Documentation
  • Coverage
  • 20%
    1 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 8.06 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 356.87 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kristencornelsen

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%
}