[][src]Module camel_up::fraction

provides a means to calculate with fractions.

let f = Fraction::new(1,2);
let g = Fraction::new(1,3);

let sum = f + g;

assert_eq!(sum, Fraction::new(5,6));

Structs

Fraction

Fraction::new(n, d) represents the rational number n/d.