al_fixasin(3)
π al_fixasin(3) β Allegro 5 API π
okay so this is the al_fixasin(3) page from the Library Functions Manual, and it's serving pure Allegro 5 API realness, bestie. Let's go β¨
π NAME π
al_fixasin β Allegro 5 API π¦
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
al_fixed al_fixasin(al_fixed x);
πΈ DESCRIPTION πΈ
This function finds the inverse sine of a value using a lookup table. The input value must be a fixed point value, no cap.
The inverse sine 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. It's giving "domain error, bestie" π
Example:
float angle;
al_fixed val;
/* Sets `val' to a right binary angle (64). */
val = al_fixasin(al_itofix(1));
/* Sets `angle' to 0.2405. */
angle = al_fixtof(al_fixmul(al_fixasin(al_ftofix(0.238)), al_fixtorad_r));
/* This will trigger the assert. */
val = al_fixasin(al_ftofix(-1.09));
assert(!al_get_errno());
That last chunk is literally the one that triggers the assert, so yeah β it's a whole moment π
π RETURN VALUE π
Returns the inverse sine of a fixed point value, measured as a fixed point binary format angle, or zero if the input was out of the range. All return values of this function will be in the range -64 to 64, periodt. π
source/version: Allegro reference manual π page: al_fixasin(3) π«Ά date: not shown on this one, so we're not inventing one, bestie π
π¦ 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