ATan2Errors

Type Alias ATan2Errors 

Source
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

§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 or x in atan2(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 via ATan2InputErrors.

  • Output { source: <RawReal as RawScalarTrait>::RawErrors }: Indicates that the computed result of atan2 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). The source 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.