pub type ATan2Errors<RawReal> = FunctionErrors<ATan2InputErrors<RawReal>, <RawReal as RawScalarTrait>::ValidationErrors>;
Expand description
A type alias for FunctionErrors
, specialized for errors that can occur during
the computation of the 2-argument arctangent (atan2
).
This type represents the possible failures when calling ATan2::try_atan2()
.
§Generic Parameters
RawReal
: A type that implementsRawRealTrait
. This type parameter defines:- The type for the input arguments of
atan2
viaATan2InputErrors<RawReal>
. - The raw error type for validating the real number inputs and the output, via
<RawReal as RawScalarTrait>::RawErrors
. This is typicallycrate::validation::ErrorsValidationRawReal<f64>
forf64
or a similar type for other numeric backends.
- The type for the input arguments of
§Variants
This type alias wraps FunctionErrors
, which has the following variants in this context:
-
Input { source: ATan2InputErrors<RawReal> }
: Indicates that one or both input arguments (y
orx
inatan2(y, x)
) were invalid. This could be due to:- The numerator failing general validation checks (e.g., NaN, Infinity).
- The denominator failing general validation checks (e.g., NaN, Infinity).
- Both numerator and denominator being zero.
The
source
field provides more specific details viaATan2InputErrors
. -
Output { source: <RawReal as RawScalarTrait>::RawErrors }
: Indicates that the computed result ofatan2
itself failed validation. This typically means the result yielded a non-finite value (e.g., NaN or Infinity), which should generally not happen if the inputs are valid and finite (excluding 0/0). Thesource
field contains the raw validation error for the output real number.
Aliased Type§
pub enum ATan2Errors<RawReal> {
Input {
source: ATan2InputErrors<RawReal>,
},
Output {
source: <RawReal as RawScalarTrait>::ValidationErrors,
},
}
Variants§
Input
Error due to invalid input values.
This variant is returned when initial validation of the function’s arguments
fails according to the defined validation policy (e.g.,
StrictFinitePolicy
) or due to
domain-specific constraints (e.g., negative input to a real logarithm).
Fields
source: ATan2InputErrors<RawReal>
The source error that occurred during input validation. This provides specific details about why the input was considered invalid.
Output
Error due to the computed output failing validation.
This variant is returned if the result of the computation, even from valid inputs, fails validation according to the defined policy. This typically means the result was non-finite (NaN or Infinity) or otherwise did not meet the criteria for a valid output.
Fields
source: <RawReal as RawScalarTrait>::ValidationErrors
The source error that occurred during output validation. This provides specific details about why the computed output was considered invalid.