ratioed
Types
Functions
pub fn div(a: Ratio, b: Ratio) -> Ratio
Divide one rational by another, division by 0 will return 0.
pub fn from_f(f: Float) -> Ratio
Create a rational from a float with maximum error of 2^-51
pub fn from_f_epsilon(f: Float, e: Float) -> Ratio
Create a rational from a float with a given maximum error
pub fn from_i2(numerator n: Int, denominator d: Int) -> Ratio
Create a rational given an integer numerator and denominator
pub fn to_i(a: Ratio) -> Int
Convert a rational to an integer, truncating (round towards 0)