Math module

atan

procedure · 2 overloadsSource

The arc tangent of x in radians, in (-pi/2, pi/2). float and float64. NaN and zero are returned as they are.

ExampleOpen in playground ↗
assert(atan(cast(float64) 0) == 0);
assert(abs(atan(cast(float64) 1) - PI64 / 4) < 0.000001);
atan :: (x: float64) -> float64

Arctangent, in radians between -pi/2 and pi/2.

Parameters

x: float64
the value.

Returns

float64
atan :: (y: float32) -> float32

Arctangent, in radians between -pi/2 and pi/2.

Parameters

y: float32
the value.

Returns

float32

See also