pub enum ATan2InputErrors<RawReal: RawRealTrait> {
InvalidNumerator {
source: <RawReal as RawScalarTrait>::ValidationErrors,
},
InvalidDenominator {
source: <RawReal as RawScalarTrait>::ValidationErrors,
},
ZeroOverZero {
backtrace: Backtrace,
},
}Expand description
Errors that can occur during the input validation phase when attempting to compute
the 2-argument arctangent (atan2).
This enum is used as a source for the Input variant of ATan2Errors.
It is generic over RawReal: RawRealTrait, which defines the specific raw real number type
(via RawReal: RawRealTrait) and its associated validation error type (via <RawReal as RawScalarTrait>::ValidationErrors)
for the numerator and denominator inputs.
atan2(y, x) computes the principal value of the arctangent of y/x, using the
signs of both arguments to determine the quadrant of the result.
Variants§
InvalidNumerator
The numerator (y in atan2(y, x)) failed basic validation checks.
This error occurs if the numerator itself is considered invalid
according to the validation policy (e.g., StrictFinitePolicy),
such as being NaN or Infinity.
Fields
source: <RawReal as RawScalarTrait>::ValidationErrorsThe underlying validation error from the numerator’s raw real type.
InvalidDenominator
The denominator (x in atan2(y, x)) failed basic validation checks.
This error occurs if the denominator itself is considered invalid
according to the validation policy (e.g., StrictFinitePolicy),
such as being NaN or Infinity.
Fields
source: <RawReal as RawScalarTrait>::ValidationErrorsThe underlying validation error from the denominator’s raw real type.
ZeroOverZero
Both the numerator (y) and the denominator (x) are zero.
The atan2(0, 0) case is undefined or implementation-specific in many contexts.
This library considers it an error.
Trait Implementations§
Source§impl<RawReal: Debug + RawRealTrait> Debug for ATan2InputErrors<RawReal>
impl<RawReal: Debug + RawRealTrait> Debug for ATan2InputErrors<RawReal>
Source§impl<RawReal: RawRealTrait> Display for ATan2InputErrors<RawReal>
impl<RawReal: RawRealTrait> Display for ATan2InputErrors<RawReal>
Source§impl<RawReal: RawRealTrait> Error for ATan2InputErrors<RawReal>
impl<RawReal: RawRealTrait> Error for ATan2InputErrors<RawReal>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Source§fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
error_generic_member_access)