v923z / micropython-ulab

a numpy-like fast vector module for micropython, circuitpython, and their derivatives
https://micropython-ulab.readthedocs.io/en/latest
MIT License
403 stars 111 forks source link

Use enum instead of const for float consts with repr C #591

Closed dpgeorge closed 1 year ago

dpgeorge commented 1 year ago

Older compilers (eg for esp8266) cannot see that "const uint32_t" is a true constant at compile time, so use an assigned enum instead.

Don't do this for object representation D because that requires a 64-bit integer.

v923z commented 1 year ago

Many thanks, I really appreciate these contributions, because I would never find such nuances.

dpgeorge commented 1 year ago

You're welcome!