File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -780,7 +780,7 @@ impl f32 {
780
780
unsafe { cmath:: atanf ( self ) }
781
781
}
782
782
783
- /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
783
+ /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians .
784
784
///
785
785
/// * `x = 0`, `y = 0`: `0`
786
786
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
@@ -791,12 +791,13 @@ impl f32 {
791
791
/// use std::f32;
792
792
///
793
793
/// let pi = f32::consts::PI;
794
- /// // All angles from horizontal right (+x)
795
- /// // 45 deg counter-clockwise
794
+ /// // Positive angles measured counter-clockwise
795
+ /// // from positive x axis
796
+ /// // -pi/4 radians (45 deg clockwise)
796
797
/// let x1 = 3.0f32;
797
798
/// let y1 = -3.0f32;
798
799
///
799
- /// // 135 deg clockwise
800
+ /// // 3pi/4 radians ( 135 deg counter- clockwise)
800
801
/// let x2 = -3.0f32;
801
802
/// let y2 = 3.0f32;
802
803
///
Original file line number Diff line number Diff line change @@ -716,7 +716,7 @@ impl f64 {
716
716
unsafe { cmath:: atan ( self ) }
717
717
}
718
718
719
- /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
719
+ /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians .
720
720
///
721
721
/// * `x = 0`, `y = 0`: `0`
722
722
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
@@ -727,12 +727,13 @@ impl f64 {
727
727
/// use std::f64;
728
728
///
729
729
/// let pi = f64::consts::PI;
730
- /// // All angles from horizontal right (+x)
731
- /// // 45 deg counter-clockwise
730
+ /// // Positive angles measured counter-clockwise
731
+ /// // from positive x axis
732
+ /// // -pi/4 radians (45 deg clockwise)
732
733
/// let x1 = 3.0_f64;
733
734
/// let y1 = -3.0_f64;
734
735
///
735
- /// // 135 deg clockwise
736
+ /// // 3pi/4 radians ( 135 deg counter- clockwise)
736
737
/// let x2 = -3.0_f64;
737
738
/// let y2 = 3.0_f64;
738
739
///
You can’t perform that action at this time.
0 commit comments