Skip to content

Commit b4d0c32

Browse files
Fix atan2 inaccuracy in documentation
1 parent 76c5ed2 commit b4d0c32

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

library/std/src/num/f128.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,10 @@ impl f128 {
557557

558558
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
559559
///
560-
/// * `x = 0`, `y = 0`: `0`
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)`
560+
/// * `x >= +0`, `y >= +0`: `[+0, +pi/2]`
561+
/// * `x >= +0`, `y <= -0`: `[+pi/2, +pi]`
562+
/// * `x <= -0`, `y >= +0`: `[-pi/2, -0]`
563+
/// * `x <= -0`, `y <= -0`: `[-pi, -pi/2]`
564564
///
565565
/// # Unspecified precision
566566
///

library/std/src/num/f16.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,10 @@ impl f16 {
522522

523523
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
524524
///
525-
/// * `x = 0`, `y = 0`: `0`
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)`
525+
/// * `x >= +0`, `y >= +0`: `[+0, +pi/2]`
526+
/// * `x >= +0`, `y <= -0`: `[+pi/2, +pi]`
527+
/// * `x <= -0`, `y >= +0`: `[-pi/2, -0]`
528+
/// * `x <= -0`, `y <= -0`: `[-pi, -pi/2]`
529529
///
530530
/// # Unspecified precision
531531
///

library/std/src/num/f32.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,10 +826,10 @@ impl f32 {
826826

827827
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
828828
///
829-
/// * `x = 0`, `y = 0`: `0`
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)`
829+
/// * `x >= +0`, `y >= +0`: `[+0, +pi/2]`
830+
/// * `x >= +0`, `y <= -0`: `[+pi/2, +pi]`
831+
/// * `x <= -0`, `y >= +0`: `[-pi/2, -0]`
832+
/// * `x <= -0`, `y <= -0`: `[-pi, -pi/2]`
833833
///
834834
/// # Unspecified precision
835835
///

library/std/src/num/f64.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,10 +826,10 @@ impl f64 {
826826

827827
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
828828
///
829-
/// * `x = 0`, `y = 0`: `0`
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)`
829+
/// * `x >= +0`, `y >= +0`: `[+0, +pi/2]`
830+
/// * `x >= +0`, `y <= -0`: `[+pi/2, +pi]`
831+
/// * `x <= -0`, `y >= +0`: `[-pi/2, -0]`
832+
/// * `x <= -0`, `y <= -0`: `[-pi, -pi/2]`
833833
///
834834
/// # Unspecified precision
835835
///

0 commit comments

Comments
 (0)