This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:examples:maths:generating_random_numbers [2018/02/14 00:47 (7 years ago)] – external edit 127.0.0.1 | en:examples:maths:generating_random_numbers [2019/11/17 00:22 (6 years ago)] (current) – [Code] sausage | ||
---|---|---|---|
Line 6: | Line 6: | ||
//somewhere in the init | //somewhere in the init | ||
orxMath_InitRandom((orxS32)orxSystem_GetRealTime()); | orxMath_InitRandom((orxS32)orxSystem_GetRealTime()); | ||
+ | </ | ||
+ | This also will ensure your random values from your Data Config are also properly randomised. See also [[en: | ||
+ | < | ||
// | // | ||
orxFLOAT randomNumber = orxMath_GetRandomFloat(1, | orxFLOAT randomNumber = orxMath_GetRandomFloat(1, | ||
</ | </ | ||
+ | |||