diff options
| author | bors <bors@rust-lang.org> | 2013-06-11 00:22:34 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-11 00:22:34 -0700 |
| commit | 075da9c3e9f326589056abd6edf1f196f6b2e244 (patch) | |
| tree | 0637fc10b2376855159506fabc7a92c9200ca044 /src/libstd/num/float.rs | |
| parent | 6bdd4c854575a6f92501f060e67c60bebea14e03 (diff) | |
| parent | 19c31b6b1afef7cad83275b2e73d27e5c44ed2a1 (diff) | |
| download | rust-075da9c3e9f326589056abd6edf1f196f6b2e244.tar.gz rust-075da9c3e9f326589056abd6edf1f196f6b2e244.zip | |
auto merge of #7050 : huonw/rust/extra-complex-work, r=Aatch
Diffstat (limited to 'src/libstd/num/float.rs')
| -rw-r--r-- | src/libstd/num/float.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/num/float.rs b/src/libstd/num/float.rs index a96a854e6a0..267a8890e82 100644 --- a/src/libstd/num/float.rs +++ b/src/libstd/num/float.rs @@ -475,8 +475,8 @@ impl Fractional for float { impl Algebraic for float { #[inline(always)] - fn pow(&self, n: float) -> float { - (*self as f64).pow(n as f64) as float + fn pow(&self, n: &float) -> float { + (*self as f64).pow(&(*n as f64)) as float } #[inline(always)] @@ -495,8 +495,8 @@ impl Algebraic for float { } #[inline(always)] - fn hypot(&self, other: float) -> float { - (*self as f64).hypot(other as f64) as float + fn hypot(&self, other: &float) -> float { + (*self as f64).hypot(&(*other as f64)) as float } } @@ -532,8 +532,8 @@ impl Trigonometric for float { } #[inline(always)] - fn atan2(&self, other: float) -> float { - (*self as f64).atan2(other as f64) as float + fn atan2(&self, other: &float) -> float { + (*self as f64).atan2(&(*other as f64)) as float } /// Simultaneously computes the sine and cosine of the number @@ -566,8 +566,8 @@ impl Exponential for float { /// Returns the logarithm of the number with respect to an arbitrary base #[inline(always)] - fn log(&self, base: float) -> float { - (*self as f64).log(base as f64) as float + fn log(&self, base: &float) -> float { + (*self as f64).log(&(*base as f64)) as float } /// Returns the base 2 logarithm of the number |
