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 [2019/11/17 08:18 (6 years ago)] – sausage | en:examples:maths:generating_random_numbers [2025/09/30 17:26 (6 weeks ago)] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| 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: | 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, | ||