# MATH_InitRand*

## C Specification

      #include <nitro/math/rand.h>

      static inline void MATH_InitRand32( MATHRandContext32 *context, u64 seed );

      static inline void MATH_InitRand16( MATHRandContext16 *context, u32 seed );

## Arguments

`context` | Pointer to the random-number context being initialized.
seed | The Seed value for initialization.

## Return Values

None.

## Description

This function initializes the context of a random number generated using the linear congruential method. For a 32-bit random number, initialization is done using a multiplier of `0x5D588B656C078965` and an addend of `0x269EC3`. For a 16-bit random number, the multiplier is `0x5D588B65` and the addend is `0x269EC3`. To change these parameters, initialize and then make corrections to the members of the `MATHRandContext*` structure.

## See Also

`MATHRandContext*`, `MATH_Rand*`

## Revision History

12/13/2004 Initial version.

CONFIDENTIAL