Method: CCMath.asin

Defined in:
ext/ccmath/ccmath.c

.asin(z) ⇒ Object



270
271
272
273
274
275
276
277
278
279
280
# File 'ext/ccmath/ccmath.c', line 270

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

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

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