acos, asin, atan, atan2

Gamma: Version 4.0
Prev |  | Next

# `acos`, `asin`, `atan`, `atan2`

`acos`, `asin`, `atan`, `atan2` -- perform trigonometric arc functions.

## Syntax

    acos (number)
    asin (number)
    atan (number)
    atan2 (number, number)

## Arguments

`number`

  Any integer or real number. Non-numbers are treated as zero.

## Returns

The result of the arc trigonometric function in radians.

## Description

These functions perform the arc trigonometric functions arc cosine, arc sine, arc tangent, and arc tangent with 2 arguments. The `atan2` function is equivalent to:

`atan( y / x );`

except that `atan2` is able to correctly handle x and y values of zero.

## Example

        Gamma> acos (0.5);
        1.0471975511965978534
        Gamma> asin (0.5);
        0.52359877559829892668
        Gamma> atan (2);
        1.107148717794090409
        Gamma> atan2 (1, 2);
        0.46364760900080609352
        Gamma> atan2 (1, 0);
        1.570796326794896558
        Gamma> atan2 (0, 2);
        0
        Gamma>

## See Also

`sin`, `cos`, `tan`

Prev | Home | Next
Math | Up | `and`, `not`, `or`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.