

#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 - 10 is set here, the entire range of numbers can be gotten. |
A 16-bit random value for the MATH_Rand16 function and a 32-bit random value for the MATH_Rand32 function.
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*
2004/12/13 Initial version.
CONFIDENTIAL