We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deefb1f commit 8a4be80Copy full SHA for 8a4be80
src/libstd/num/mod.rs
@@ -268,10 +268,8 @@ pub trait Trigonometric {
268
/// ```rust
269
/// let y = 3f32.sqrt();
270
/// let x = 1f32;
271
- /// let pi_3 = 1.04719758f32;
272
- /// assert_approx_eq!(y.atan2(&x), pi_3);
273
- /// let neg_2_pi_3 = -2.09439516f32;
274
- /// assert_approx_eq!((-y).atan2(&(-x)), neg_2_pi_3);
+ /// assert_approx_eq!(y.atan2(&x), f32::consts::PI / 3f32);
+ /// assert_approx_eq!((-y).atan2(&(-x)), - 2f32 * f32::consts::PI / 3f32);
275
/// ```
276
fn atan2(&self, other: &Self) -> Self;
277
0 commit comments