Method: CCMath.atan

Defined in:
ext/ccmath/ccmath.c

.atan(z) ⇒ Object



323
324
325
326
327
328
329
330
331
332
333
# File 'ext/ccmath/ccmath.c', line 323

static VALUE
ccmath_atan(VALUE obj, VALUE z)
{
    EXTRACT_DBLS(z);

    if (z_imag == 0.0) return DBLS2COMP(atan(z_real), 0.0);

    VALUE s = ccmath_atanh(obj, DBLS2COMP(-z_imag, z_real));
    EXTRACT_DBLS(s);
    return DBLS2COMP(s_imag, -s_real);
}