Skip to content

MTY_GetRandomUInt

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Generate a random unsigned integer within a range.

uint32_t MTY_GetRandomUInt(
    uint32_t minVal,
    uint32_t maxVal
);

Parameters

minVal (uint32_t)

Low of the random range, inclusive.

maxVal (uint32_t)

High end of the random range, exclusive.

Return value

uint32_t

If maxVal <= minVal, minVal is returned.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: Crypto

Clone this wiki locally