1fixasin(3)                      Allegro manual                      fixasin(3)
2
3
4

NAME

6       fixasin  - Fixed point inverse sine lookup table. Allegro game programā€
7       ming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       fixed fixasin(fixed x);
14

DESCRIPTION

16       This function finds the inverse sine of a value using a  lookup  table.
17       The  input  value  must  be  a  fixed  point value. The inverse sine is
18       defined only in the domain from `-1' to  `1'.  Outside  of  this  input
19       range, the function will set `errno' to EDOM and return zero. Example:
20
21          float angle;
22          fixed val;
23
24          /* Sets `val' to a right binary angle (`64'). */
25          val = fixasin(itofix(1));
26          /* Sets `angle' to 0.2405. */
27          angle = fixtof(fixmul(fixasin(ftofix(0.238)), fixtorad_r));
28          /* This will trigger the assert. */
29          val = fixasin(ftofix(-1.09));
30          ASSERT(!errno);
31

RETURN VALUE

33       Returns  the  inverse  sine  of  a fixed point value, measured as fixed
34       point binary format angle, or zero if the input was out of  the  range.
35       All return values of this function will be in the range `-64' to `64'.
36
37

SEE ALSO

39Allegro                          version 4.2.2                      fixasin(3)
Impressum