1al_fixcos(3)               Library Functions Manual               al_fixcos(3)
2
3
4

NAME

6       al_fixcos
7

SYNOPSIS

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

DESCRIPTION

14       This  function  finds  the cosine of a value using a lookup table.  The
15       input value must be a fixed point binary angle.
16
17       Example:
18
19                  al_fixed angle;
20                  float result;
21
22                  /* Set the binary angle to 45 degrees. */
23                  angle = al_itofix(32);
24
25                  /* The cosine of 45 degrees is about 0.7071. */
26                  result = al_fixtof(al_fixcos(angle));
27                  assert(result > 0.7 && result < 0.71);
28

RETURN VALUE

30       Returns the cosine of a fixed point binary format  angle.   The  return
31       value will be in radians.
32
33
34
35Allegro reference manual                                          al_fixcos(3)
Impressum