unsafe { cmath::atanf(self) }
}
- /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
+ /// 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]`
/// use std::f32;
///
/// let pi = f32::consts::PI;
- /// // All angles from horizontal right (+x)
- /// // 45 deg counter-clockwise
+ /// // Positive angles measured counter-clockwise
+ /// // from positive x axis
+ /// // -pi/4 radians (45 deg clockwise)
/// let x1 = 3.0f32;
/// let y1 = -3.0f32;
///
- /// // 135 deg clockwise
+ /// // 3pi/4 radians (135 deg counter-clockwise)
/// let x2 = -3.0f32;
/// let y2 = 3.0f32;
///
unsafe { cmath::atan(self) }
}
- /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`).
+ /// 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]`
/// use std::f64;
///
/// let pi = f64::consts::PI;
- /// // All angles from horizontal right (+x)
- /// // 45 deg counter-clockwise
+ /// // Positive angles measured counter-clockwise
+ /// // from positive x axis
+ /// // -pi/4 radians (45 deg clockwise)
/// let x1 = 3.0_f64;
/// let y1 = -3.0_f64;
///
- /// // 135 deg clockwise
+ /// // 3pi/4 radians (135 deg counter-clockwise)
/// let x2 = -3.0_f64;
/// let y2 = 3.0_f64;
///