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
min, max, abs, constrain, round and sq are all defined as macros in Arduino which is shitty for a number of reasons. Consider undefining them (#undef) and redefining them as functions.
This is a bit tricky because it might not always be backwards-compatible with Arduino code so we must be very careful in how to implement it.
The text was updated successfully, but these errors were encountered:
sofian
changed the title
Consider replacing min(), max(), constrain(), etc. macros by functions
Consider replacing min(), max(), constrain(), round(), etc. macros by functions
Feb 28, 2024
sofian
changed the title
Consider replacing min(), max(), constrain(), round(), etc. macros by functions
Replace min(), max(), constrain(), round(), etc. macros by functions
Feb 28, 2024
min, max, abs, constrain, round and sq are all defined as macros in Arduino which is shitty for a number of reasons. Consider undefining them (
#undef
) and redefining them as functions.This is a bit tricky because it might not always be backwards-compatible with Arduino code so we must be very careful in how to implement it.
The text was updated successfully, but these errors were encountered: