1al_fixasin(3)                                                    al_fixasin(3)
2
3
4

NAME

6       al_fixasin - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              al_fixed al_fixasin(al_fixed x);
12

DESCRIPTION

14       This  function  finds the inverse sine of a value using a lookup table.
15       The input value must be a fixed point value.  The inverse sine  is  de‐
16       fined  only  in  the domain from -1 to 1.  Outside of this input range,
17       the function will set Allegro’s errno to EDOM and return zero.
18
19       Example:
20
21              float angle;
22              al_fixed val;
23
24              /* Sets `val' to a right binary angle (64). */
25              val = al_fixasin(al_itofix(1));
26
27              /* Sets `angle' to 0.2405. */
28              angle = al_fixtof(al_fixmul(al_fixasin(al_ftofix(0.238)), al_fixtorad_r));
29
30              /* This will trigger the assert. */
31              val = al_fixasin(al_ftofix(-1.09));
32              assert(!al_get_errno());
33

RETURN VALUE

35       Returns the inverse sine of a fixed  point  value,  measured  as  fixed
36       point  binary  format angle, or zero if the input was out of the range.
37       All return values of this function will be in the range -64 to 64.
38
39
40
41Allegro reference manual                                         al_fixasin(3)
Impressum