# The Inverse (Arc) Functions

The next question that comes up is if you have two sides of the right triangle, and you need to know the angle. The arc functions of sine, cosine and tangent resolve this issue. Let's use the same reference diagram for the following discussion.

Figure 12-2. A right triangle

The arc sine function (`asin`, also known as the inverse sine) gives theta (the angle in radians) from the height (AB) over the hypotenuse (AC). The other arc functions, `acos`, and `atan`, behave as their more-familiar counterparts. So, the arc-cosine gives theta from the base (BC) and the hypotenuse (AC); the arc-tangent, from the height(AB) and the base (BC). Again, to convert from radians to degrees, multiple the result by 180 / pi.

 `asin` [Generic]

Returns the arc-sine of a real number

Synopsis

asin (x) => (y)

Parameters

 x An instance of ``.

Return Values

 y An instance of ``.

Description

Given the hypotenuse (AC) and the height (AB), the arc-sine gives theta in the diagram: the angle in radians.

 `acos` [Generic]

Returns the arc-cosine of a real number

Synopsis

acos (x) => (y)

Parameters

 x An instance of ``.

Return Values

 y An instance of ``.

Description

Given the hypotenuse (AC) and the base (BC), the arc-cosine gives theta in Figure 12-2: the angle in radians.

 `atan` [Generic]

Returns the arc-tangent of a real number

Synopsis

atan (x) => (y)

Parameters

 x An instance of ``.

Return Values

 y An instance of ``.

Description

Given the height (AB) over the base (BC), the arc-tangent gives theta in the diagram: the angle in radians.

 `atan2` [Generic]

Returns the arc-tangent of a pair of real numbers

Synopsis

atan2 (y, x) => (z)

Parameters

 y An instance of ``. x An instance of ``.

Return Values

 z An instance of ``.

Description

Given the height (AB) as y and the base (BC) as x, the arc-tangent gives theta as z: the angle in radians.