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
If i understood correctly, randNum after raw initialization can contain ANY number in range of int32_t.
I'm not strong in math but that line looks strange:
It does clipping the number from top, but not from bottom. Maybe use map or its equivalent formula here?
The min/max implementation is the same as in Arduino AVR core to achieve the exact same behavior as Arduino random() function. There was however a bug in negative number handling.
Is there a bug in random generate function (overload with min/max parameters)?
To Reproduce
Actual result
Expected behavior
Should return something between specified parameters.
Additional info (please complete):
The text was updated successfully, but these errors were encountered: