libstd: denominator isn't quotient
This commit is contained in:
parent
3830040a89
commit
e6c4471ed8
@ -51,7 +51,7 @@ impl<T: Copy + Num + Ord>
|
||||
#[inline(always)]
|
||||
pub fn new(numer: T, denom: T) -> Ratio<T> {
|
||||
if denom == Zero::zero() {
|
||||
fail!(~"quotient of 0");
|
||||
fail!(~"denominator == 0");
|
||||
}
|
||||
let mut ret = Ratio::new_raw(numer, denom);
|
||||
ret.reduce();
|
||||
|
Loading…
Reference in New Issue
Block a user