Lines Matching defs:Rational
9 pub struct Rational(pub i32, pub i32); struct
11 impl Rational { impl
28 pub fn reduce(&self) -> Rational { in reduce()
36 pub fn reduce_with_limit(&self, max: i32) -> Result<Rational, Rational> { in reduce_with_limit() argument
58 pub fn invert(&self) -> Rational { in invert()
63 impl From<AVRational> for Rational { implementation
65 fn from(value: AVRational) -> Rational { in from()
80 impl From<f64> for Rational { implementation
82 fn from(value: f64) -> Rational { in from()
101 impl From<(i32, i32)> for Rational { implementation
102 fn from((num, den): (i32, i32)) -> Rational { in from() argument
107 impl PartialEq for Rational { implementation
124 impl Eq for Rational {} implementation
126 impl PartialOrd for Rational { implementation
141 impl Add for Rational { implementation
145 fn add(self, other: Rational) -> Rational { in add()
150 impl Sub for Rational { implementation
154 fn sub(self, other: Rational) -> Rational { in sub()
159 impl Mul for Rational { implementation
163 fn mul(self, other: Rational) -> Rational { in mul()
168 impl Div for Rational { implementation
172 fn div(self, other: Rational) -> Rational { in div()
177 impl fmt::Display for Rational { implementation
183 impl fmt::Debug for Rational { implementation
194 pub fn nearer(q: Rational, q1: Rational, q2: Rational) -> Ordering { in nearer()