Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilise f32::to_{degrees,radians} to match f64 #30672

Merged
merged 1 commit into from
Jan 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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