Skip to content

Commit

Permalink
Auto merge of #30672 - nagisa:to-degrad-stab, r=sfackler
Browse files Browse the repository at this point in the history
f64 methods have been stable since rust 1.0, but f32 never got stabilised.

I suggest backporting this to beta as well (needs changing stablilisation version then).

r? @aturon

Fixes rust-lang/rfcs#1438
  • Loading branch information
bors committed Jan 1, 2016
2 parents 5446139 + c921abf commit d4b67cd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/libstd/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,6 @@ impl f32 {
/// Converts radians to degrees.
///
/// ```
/// #![feature(float_extras)]
///
/// use std::f32::{self, consts};
///
/// let angle = consts::PI;
Expand All @@ -686,16 +684,13 @@ impl f32 {
///
/// assert!(abs_difference <= f32::EPSILON);
/// ```
#[unstable(feature = "float_extras", reason = "desirability is unclear",
issue = "27752")]
#[stable(feature = "f32_deg_rad_conversions", since="1.7.0")]
#[inline]
pub fn to_degrees(self) -> f32 { num::Float::to_degrees(self) }

/// Converts degrees to radians.
///
/// ```
/// #![feature(float_extras)]
///
/// use std::f32::{self, consts};
///
/// let angle = 180.0f32;
Expand All @@ -704,8 +699,7 @@ impl f32 {
///
/// assert!(abs_difference <= f32::EPSILON);
/// ```
#[unstable(feature = "float_extras", reason = "desirability is unclear",
issue = "27752")]
#[stable(feature = "f32_deg_rad_conversions", since="1.7.0")]
#[inline]
pub fn to_radians(self) -> f32 { num::Float::to_radians(self) }

Expand Down

0 comments on commit d4b67cd

Please sign in to comment.