al_fixasin(3)

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

πŸ’– 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