Kore
Loading...
Searching...
No Matches
random.h File Reference

Generates values which are kind of random. More...

#include <kinc/global.h>

Go to the source code of this file.

Functions

KINC_FUNC void kinc_random_init (int64_t seed)
 Initializes the randomizer with a seed. This is optional but helpful.
KINC_FUNC int64_t kinc_random_get (void)
 Returns a random value.
KINC_FUNC int64_t kinc_random_get_max (int64_t max)
 Returns a value between 0 and max (both inclusive).
KINC_FUNC int64_t kinc_random_get_in (int64_t min, int64_t max)
 Returns a value between min and max (both inclusive).

Detailed Description

Generates values which are kind of random.

Function Documentation

◆ kinc_random_get()

KINC_FUNC int64_t kinc_random_get ( void )

Returns a random value.

Returns
A random value

◆ kinc_random_get_in()

KINC_FUNC int64_t kinc_random_get_in ( int64_t min,
int64_t max )

Returns a value between min and max (both inclusive).

Returns
A random value

◆ kinc_random_get_max()

KINC_FUNC int64_t kinc_random_get_max ( int64_t max)

Returns a value between 0 and max (both inclusive).

Returns
A random value

◆ kinc_random_init()

KINC_FUNC void kinc_random_init ( int64_t seed)

Initializes the randomizer with a seed. This is optional but helpful.

Parameters
seedA value which should ideally be pretty random