al_fixtan(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸŽ€ NAME πŸŽ€

Okay bestie, this is al_fixtan(3) from the Library Functions Manual, and it’s all about the Allegro 5 API ✨.

  • al_fixtan β€” Allegro 5 API πŸ’…

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

al_fixed al_fixtan(al_fixed x);

πŸ’– DESCRIPTION πŸ’–

So this function finds the tangent of a value using a lookup table β€” no cap, that’s literally the mechanic 🫢. The input value must be a fixed point binary angle. That’s the vibe check: fixed point binary angle or bust πŸ’….

Example incoming, bestie πŸ‘‡:

al_fixed angle, res_a, res_b;
float dif;

angle = al_itofix(37);
/* Prove that tan(angle) == sin(angle) / cos(angle). */
res_a = al_fixdiv(al_fixsin(angle), al_fixcos(angle));
res_b = al_fixtan(angle);
dif = al_fixtof(al_fixsub(res_a, res_b));
printf("Precision error: %f\n", dif);

🌸 RETURN VALUE 🌸

Returns the tangent of a fixed point binary format angle as a fixed point value. Periodt πŸ’–.


That’s the whole page, bestie 🫢. The footer energy is Allegro reference manual + al_fixtan(3), and there’s no date shown on this one β€” so consider this your cute lil sign-off from the Allegro reference manual πŸ’–, page al_fixtan(3) ✨.

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms