AUFIXEDPOINTFROMFRACTION(3nas)

πŸ’– AuFixedPointFromFraction β€” make a fixed point value πŸ’–

okay bestie, so this one is from the audiolib crew, and it's genuinely the cutest tiny little macro you'll ever meet. it makes fixed point values. that's it. that's the whole job. and it does it with main character energy. ✨


🌸 SYNOPSIS 🌸

#include <audio/audiolib.h>

AuFixedPoint AuFixedPointFromFraction(nnn, ddd)
      int nnn;
      int ddd;

πŸŽ€ ARGUMENTS πŸŽ€

  • nnn β€” the numerator, babe. the top half of the fraction. the one on the pedestal. πŸ‘‘
  • ddd β€” the denominator. the bottom half. the one doing the actual dividing. no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, AuFixedPointFromFraction builds you a whole fixed point value by dividing nnn by ddd. that's the vibe. numerator goes in, denominator goes in, fixed point value comes out. periodt. πŸ’…

and the tea? it's implemented as a macro. not a real function, a macro. so don't come for it expecting function-call behaviour, because it is not giving that. 🧚


πŸ’œ SEE ALSO πŸ’œ

  • AuFixePointFractionalAddend
  • AuFixePointFromSum
  • AuFixePointIntegralAddend
  • AuFixePointRoundDown
  • AuFixePointRoundUp
  • audiolib β€” Network Audio System C Language Interface

and that's the whole page, my love. this manual is from audiolib version 1.9.4, dated right there in the footer as AuFixedPointFromFraction(3), and it lives under the Library Functions Manual section (section 3, for the curious girlies πŸ“). go forth and make those fixed point values. slay. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from