DoxigAlpha

cos

Returns the cosine of z.

Function parameters

Parameters

#
z:anytype

Returns the cosine of z.

Functions

#
cos
Returns the cosine of z.

Source

Implementation

#
pub fn cos(z: anytype) Complex(@TypeOf(z.re, z.im)) {
    const T = @TypeOf(z.re, z.im);
    const p = Complex(T).init(-z.im, z.re);
    return cmath.cosh(p);
}