Old SP Forum
Discussions
Activity
Home
›
Technical details and features
Sign In
·
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
956
All Categories
497
General
87
Technical details and features
159
Feature requests and bug reports
155
Troubleshooting
5
Patch sharing area
53
Off Topic
[Coding] random function , returned values?
egnouf
May 2014
edited May 2014
in
Technical details and features
hello,
when i do:
uint8_t numberRandomSteps = GetRngValue();
i will get values between 0 and 255 ?
cheers!
Comments
julian
May 2014
yes.
GetRngValue() returns a 32-bit value that will be casted to uint8_t.
you are just discarding the upper 24 bit.
egnouf
May 2014
oki, perfect , i continue then to program :-)
Sign In
or
Register
to comment.
Forum Software Powered by Vanilla
Comments
GetRngValue() returns a 32-bit value that will be casted to uint8_t.
you are just discarding the upper 24 bit.