DoxigAlpha

tan

Returns the tangent of z.

Function parameters

Parameters

#
z:anytype

Returns the tangent of z.

Functions

#
tan
Returns the tangent of z.

Source

Implementation

#
pub fn tan(z: anytype) Complex(@TypeOf(z.re, z.im)) {
    const T = @TypeOf(z.re, z.im);
    const q = Complex(T).init(-z.im, z.re);
    const r = cmath.tanh(q);
    return Complex(T).init(r.im, -r.re);
}