Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace min(), max(), constrain(), round(), etc. macros by functions #73

Open
sofian opened this issue Jan 14, 2023 · 0 comments
Open
Assignees

Comments

@sofian
Copy link
Collaborator

sofian commented Jan 14, 2023

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.

@sofian sofian self-assigned this Jan 14, 2023
@sofian 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 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
@sofian sofian removed the question label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant