fixatan2 (3) - Linux Manuals
fixatan2: Fixed point version of the libc atan2() routine. Allegro game programming library.
Command to display fixatan2
manual in Linux: $ man 3 fixatan2
NAME
fixatan2 - Fixed point version of the libc atan2() routine. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixatan2(fixed y, fixed x);
DESCRIPTION
This is a fixed point version of the libc atan2() routine. It computes the
arc tangent of `y / x', but the signs of both arguments are used to
determine the quadrant of the result, and `x' is permitted to be zero. This
function is useful to convert Cartesian coordinates to polar coordinates.
Example:
fixed result;
/* Sets `result' to binary angle 64. */
result = fixatan2(itofix(1), 0);
/* Sets `result' to binary angle -109. */
result = fixatan2(itofix(-1), itofix(-2));
/* Fails the assert. */
result = fixatan2(0, 0);
ASSERT(!errno);
RETURN VALUE
Returns the arc tangent of `y / x' in fixed point binary format angle,
from `-128' to `128'. If both `x' and `y' are zero, returns zero and sets
`errno' to EDOM.
Pages related to fixatan2
- fixatan (3) - Fixed point inverse tangent lookup table. Allegro game programming library.
- fixacos (3) - Fixed point inverse cosine lookup table. Allegro game programming library.
- fixadd (3) - Safe function to add fixed point numbers clamping overflow. Allegro game programming library.
- fixasin (3) - Fixed point inverse sine lookup table. Allegro game programming library.
- fix_filename_case (3) - Converts a filename to a standardised case. Allegro game programming library.
- fix_filename_slashes (3) - Converts all the directory separators to a standard character. Allegro game programming library.
- fixceil (3) - Returns the smallest integer not less than x. Allegro game programming library.