You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically some of the earlier patch releases should have been minor releases, but I wasn't expecting this library to get as popular as it has done. I'm now aiming to stick to semver as much as possible.
This release contains several new features and one bugfix.
Features include:
Operators for converting between SFixed and UFixed types.
This change was long overdue, but I am satisfied that the chosen implementation is better than what I might have come up with a few years ago.
Integer conversion operators
Ooperators for converting to all of the built-in integer types (char, short, int, long, long long and all signed and unsigned variations thereupon).
These are all explicit operators because conversion from fixed point to integer is an inherantly narrowing operation.
Postincrement and postdecrement operators.
They are provided for completeness, though I would advise against using them.
Bitwise shift operators.
These have been added purely to facilitate cheaper and faster multiplication and division by powers of two. Personally I'm not a fan of using bitshift operators for this purpose because I believe it harms readability, but since it's unlikely that a compiler would be able to perform such an optimisation on a user-defined type and I expect most users of this library are targetting microcontrollers, I've decided that the potential memory savings are worth the harmed readability.
Bugfixes include:
++ and -- would cause a shift overflow for larger types because a lone 1 was being treated as int instead of a suitably large type. This was more of a problem for AVR CPUs, where int is only 16 bits wide.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Technically some of the earlier patch releases should have been minor releases, but I wasn't expecting this library to get as popular as it has done. I'm now aiming to stick to semver as much as possible.
This release contains several new features and one bugfix.
Features include:
SFixed
andUFixed
types.char
,short
,int
,long
,long long
and allsigned
andunsigned
variations thereupon).Bugfixes include:
++
and--
would cause a shift overflow for larger types because a lone1
was being treated asint
instead of a suitably large type. This was more of a problem for AVR CPUs, whereint
is only 16 bits wide.This discussion was created from the release First minor release.
Beta Was this translation helpful? Give feedback.
All reactions