File tree Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Original file line number Diff line number Diff line change @@ -559,8 +559,17 @@ impl f128 {
559
559
///
560
560
/// * `x = 0`, `y = 0`: `0`
561
561
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
562
- /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
563
- /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
562
+ /// * `x < 0`, `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
563
+ /// * `x <= 0`, `y < 0`: `arctan(y/x) - pi` -> `[-pi, -pi/2)`
564
+ ///
565
+ /// # Special cases involving zeros
566
+ ///
567
+ /// When one or both arguments are zero, the result depends on their signs:
568
+ ///
569
+ /// * `atan2(0.0, 0.0) = 0.0`
570
+ /// * `atan2(-0.0, 0.0) = -0.0`
571
+ /// * `atan2(0.0, -0.0) = pi`
572
+ /// * `atan2(-0.0, -0.0) = -pi`
564
573
///
565
574
/// # Unspecified precision
566
575
///
Original file line number Diff line number Diff line change @@ -524,8 +524,17 @@ impl f16 {
524
524
///
525
525
/// * `x = 0`, `y = 0`: `0`
526
526
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
527
- /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
528
- /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
527
+ /// * `x < 0`, `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
528
+ /// * `x <= 0`, `y < 0`: `arctan(y/x) - pi` -> `[-pi, -pi/2)`
529
+ ///
530
+ /// # Special cases involving zeros
531
+ ///
532
+ /// When one or both arguments are zero, the result depends on their signs:
533
+ ///
534
+ /// * `atan2(0.0, 0.0) = 0.0`
535
+ /// * `atan2(-0.0, 0.0) = -0.0`
536
+ /// * `atan2(0.0, -0.0) = pi`
537
+ /// * `atan2(-0.0, -0.0) = -pi`
529
538
///
530
539
/// # Unspecified precision
531
540
///
Original file line number Diff line number Diff line change @@ -828,8 +828,17 @@ impl f32 {
828
828
///
829
829
/// * `x = 0`, `y = 0`: `0`
830
830
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
831
- /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
832
- /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
831
+ /// * `x < 0`, `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
832
+ /// * `x <= 0`, `y < 0`: `arctan(y/x) - pi` -> `[-pi, -pi/2)`
833
+ ///
834
+ /// # Special cases involving zeros
835
+ ///
836
+ /// When one or both arguments are zero, the result depends on their signs:
837
+ ///
838
+ /// * `atan2(0.0, 0.0) = 0.0`
839
+ /// * `atan2(-0.0, 0.0) = -0.0`
840
+ /// * `atan2(0.0, -0.0) = pi`
841
+ /// * `atan2(-0.0, -0.0) = -pi`
833
842
///
834
843
/// # Unspecified precision
835
844
///
Original file line number Diff line number Diff line change @@ -828,8 +828,17 @@ impl f64 {
828
828
///
829
829
/// * `x = 0`, `y = 0`: `0`
830
830
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
831
- /// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
832
- /// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
831
+ /// * `x < 0`, `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
832
+ /// * `x <= 0`, `y < 0`: `arctan(y/x) - pi` -> `[-pi, -pi/2)`
833
+ ///
834
+ /// # Special cases involving zeros
835
+ ///
836
+ /// When one or both arguments are zero, the result depends on their signs:
837
+ ///
838
+ /// * `atan2(0.0, 0.0) = 0.0`
839
+ /// * `atan2(-0.0, 0.0) = -0.0`
840
+ /// * `atan2(0.0, -0.0) = pi`
841
+ /// * `atan2(-0.0, -0.0) = -pi`
833
842
///
834
843
/// # Unspecified precision
835
844
///
You can’t perform that action at this time.
0 commit comments