mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 19:08:41 +00:00
Fix atan2 inaccuracy in documentation
This commit is contained in:
parent
76c5ed2847
commit
d834935b57
@ -557,10 +557,12 @@ impl f128 {
|
||||
|
||||
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
|
||||
///
|
||||
/// * `x = 0`, `y = 0`: `0`
|
||||
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
|
||||
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
|
||||
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
|
||||
/// | `x` | `y` | Piecewise Definition | Range |
|
||||
/// |---------|---------|----------------------|---------------|
|
||||
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
|
||||
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
|
||||
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
|
||||
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
|
||||
///
|
||||
/// # Unspecified precision
|
||||
///
|
||||
|
||||
@ -522,10 +522,12 @@ impl f16 {
|
||||
|
||||
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
|
||||
///
|
||||
/// * `x = 0`, `y = 0`: `0`
|
||||
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
|
||||
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
|
||||
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
|
||||
/// | `x` | `y` | Piecewise Definition | Range |
|
||||
/// |---------|---------|----------------------|---------------|
|
||||
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
|
||||
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
|
||||
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
|
||||
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
|
||||
///
|
||||
/// # Unspecified precision
|
||||
///
|
||||
|
||||
@ -826,10 +826,12 @@ impl f32 {
|
||||
|
||||
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
|
||||
///
|
||||
/// * `x = 0`, `y = 0`: `0`
|
||||
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
|
||||
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
|
||||
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
|
||||
/// | `x` | `y` | Piecewise Definition | Range |
|
||||
/// |---------|---------|----------------------|---------------|
|
||||
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
|
||||
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
|
||||
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
|
||||
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
|
||||
///
|
||||
/// # Unspecified precision
|
||||
///
|
||||
|
||||
@ -826,10 +826,12 @@ impl f64 {
|
||||
|
||||
/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
|
||||
///
|
||||
/// * `x = 0`, `y = 0`: `0`
|
||||
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
|
||||
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
|
||||
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
|
||||
/// | `x` | `y` | Piecewise Definition | Range |
|
||||
/// |---------|---------|----------------------|---------------|
|
||||
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
|
||||
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
|
||||
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
|
||||
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
|
||||
///
|
||||
/// # Unspecified precision
|
||||
///
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user