percent-rs 0.1.0

Simple crate for percentages of integers and floats
Documentation

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