fixtan (3) - Linux Manuals
fixtan: Fixed point tangent of binary angles. Allegro game programming library.
Command to display fixtan
manual in Linux: $ man 3 fixtan
NAME
fixtan - Fixed point tangent of binary angles. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixtan(fixed x);
DESCRIPTION
This function finds the tangent of a value using a lookup table. The input
value must be a fixed point binary angle. Example:
fixed angle, res_a, res_b;
float dif;
angle = itofix(37);
/* Prove that tan(angle) == sin(angle) / cos(angle). */
res_a = fixdiv(fixsin(angle), fixcos(angle));
res_b = fixtan(angle);
dif = fixtof(fixsub(res_a, res_b));
allegro_message("Precision error: %f\n", dif);
RETURN VALUE
Returns the tangent of a fixed point binary format angle. The return value
will be in radians.
Pages related to fixtan
- fixtof (3) - Converts a fixed point to floating point. Allegro game programming library.
- fixtoi (3) - Converts a fixed point to integer with rounding. Allegro game programming library.
- fixtorad_r (3) - Constant to convert angles in fixed point format to radians. 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.
- 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.