Go Down

Topic: Random function is misleading (Read 1 time) previous topic - next topic


The random() functions in Arduino lib is misleading. It returns a long integer (32 bits) but it uses the rand() function in avr stdlib.h which returns an int (16 bits). As thus, I would suggest one of the following two options:

1) That the random() functions in Arduino return integers (16 bits)
2) That they make use of the random() / srandom() functions from stdlib.h which return long integers.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131