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 {
559559 ///
560560 /// * `x = 0`, `y = 0`: `0`
561561 /// * `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`
564573 ///
565574 /// # Unspecified precision
566575 ///
Original file line number Diff line number Diff line change @@ -524,8 +524,17 @@ impl f16 {
524524 ///
525525 /// * `x = 0`, `y = 0`: `0`
526526 /// * `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`
529538 ///
530539 /// # Unspecified precision
531540 ///
Original file line number Diff line number Diff line change @@ -828,8 +828,17 @@ impl f32 {
828828 ///
829829 /// * `x = 0`, `y = 0`: `0`
830830 /// * `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`
833842 ///
834843 /// # Unspecified precision
835844 ///
Original file line number Diff line number Diff line change @@ -828,8 +828,17 @@ impl f64 {
828828 ///
829829 /// * `x = 0`, `y = 0`: `0`
830830 /// * `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`
833842 ///
834843 /// # Unspecified precision
835844 ///
You can’t perform that action at this time.
0 commit comments