Skip to content

Enable fixed pragma in rrcommon

Sal requested to merge fixed-type into master

fixed is now treated as a distinct type, instead of just being an alias for int. This means scripts need to be stricter about using the proper type for their variables, but in return this includes advantages such as...

  • fixed <-> int conversions are done automatically, it will do the proper bit-shift for you. You can mix and match the two types without needing to preform voodoo magic.
  • Multiply & divide operators now work on fixed point directly, no more need to use FixedMul or FixedDiv.
  • You can use C-style type casts to manually invoke fixed <-> int conversions.

Basically; you can now use fixed point just as seamlessly as you can with floating point in basically any other programming language.

Merge request reports