DoxigAlpha

atan

Returns the arc-tangent of x.

Special Cases:

  • atan(+-0) = +-0
  • atan(+-inf) = +-pi/2

Function parameters

Parameters

#
x:anytype

Returns the arc-tangent of x.

Functions

#
atan
Returns the arc-tangent of x.

Source

Implementation

#
pub fn atan(x: anytype) @TypeOf(x) {
    const T = @TypeOf(x);
    return switch (T) {
        f32 => atan32(x),
        f64 => atan64(x),
        else => @compileError("atan not implemented for " ++ @typeName(T)),
    };
}