DoxigAlpha

acos

Returns the arc-cosine of z.

Function parameters

Parameters

#
z:anytype

Returns the arc-cosine of z.

Functions

#
acos
Returns the arc-cosine of z.

Source

Implementation

#
pub fn acos(z: anytype) Complex(@TypeOf(z.re, z.im)) {
    const T = @TypeOf(z.re, z.im);
    const q = cmath.asin(z);
    return Complex(T).init(@as(T, math.pi) / 2 - q.re, -q.im);
}