al_fixacos(3)

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

✨ NAME ✨

okay so bestie, we're on the al_fixacos page β€” it's part of the Allegro 5 API β€” and the manual name is Library Functions Manual, which I'm folding in right here instead of copying the header line like a bot 🫢.

🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

al_fixed al_fixacos(al_fixed x);

πŸŽ€ DESCRIPTION πŸŽ€

So al_fixacos finds the inverse cosine of a value using a lookup table. The input must be a fixed point value, no cap.

The inverse cosine is defined only in the domain from -1 to 1. Outside of this input range, the function will set Allegro’s errno to EDOM and return zero. That's the vibe check: out-of-range input gets EDOM plus zero 😭.

Example:

al_fixed result;

/* Sets result to binary angle 128. */
result = al_fixacos(al_itofix(-1));

πŸ”₯ RETURN VALUE πŸ”₯

Returns the inverse sine of a fixed point value β€” and yes, bestie, the page literally says inverse sine here, I'm reading it exactly and not editing it πŸ’€ β€” measured as fixed point binary format angle, or zero if the input was out of range. All return values of this function will be in the range 0 to 128. Periodt.


that's the whole page, bestie β€” go off and cosine responsibly πŸ’…

Source/version: Allegro reference manual, page al_fixacos(3). Date: not listed in the footer, so I'm not making one up 🌸.

πŸ“¦ 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