#include <nitro/math/rand.h>
static inline u16 MATH_Rand16( MATHRandContext16 *context, u16 max );
static inline u32 MATH_Rand32( MATHRandContext32 *context, u32 max );
context |
Pointer to the context of the random number |
max | Sets a maximum value for the random number being gotten. With this setting, the largest random number will be max - 1 0 is set here, the entire range of numbers can be gotten. |
None.
This function gets a random number generated using the linear congruential method.
This is an inline function, so you can optimize the code and reduce waste by setting a constant in the max
argument.
MATHRandContext*
, MATH_InitRand*
12/13/2004 Initial version.