diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-11-18 20:22:13 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-11-18 20:22:13 -0800 |
| commit | e7fab22bbfa5984ba53d37dcc59bcf72605beb55 (patch) | |
| tree | 674c98b4f982bf433de422bc673d092cf252dc47 /src/libcore/num | |
| parent | bdbc09ad484847378b87ee8d60096cd39d8fb47a (diff) | |
| download | rust-e7fab22bbfa5984ba53d37dcc59bcf72605beb55.tar.gz rust-e7fab22bbfa5984ba53d37dcc59bcf72605beb55.zip | |
Fallout from deprecation
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/f32.rs | 4 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 8092aa67b8f..add42a2ddce 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -429,12 +429,12 @@ impl Float for f32 { /// Converts to degrees, assuming the number is in radians. #[inline] - fn to_degrees(self) -> f32 { self * (180.0f32 / Float::pi()) } + fn to_degrees(self) -> f32 { self * (180.0f32 / consts::PI) } /// Converts to radians, assuming the number is in degrees. #[inline] fn to_radians(self) -> f32 { - let value: f32 = Float::pi(); + let value: f32 = consts::PI; self * (value / 180.0f32) } } diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 3ecedac732d..12c0771d0b9 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -437,12 +437,12 @@ impl Float for f64 { /// Converts to degrees, assuming the number is in radians. #[inline] - fn to_degrees(self) -> f64 { self * (180.0f64 / Float::pi()) } + fn to_degrees(self) -> f64 { self * (180.0f64 / consts::PI) } /// Converts to radians, assuming the number is in degrees. #[inline] fn to_radians(self) -> f64 { - let value: f64 = Float::pi(); + let value: f64 = consts::PI; self * (value / 180.0) } } |
