Skip to content

Commit

Permalink
Stabilise f32::to_{degrees,radians} to match f64
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.
  • Loading branch information
nagisa committed Jan 1, 2016
1 parent bfb4212 commit c921abf
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 c921abf

Please sign in to comment.