ballerina/random

Overview

This module provides APIs to generate pseudo-random numbers.

The generated values are selected pseudo-randomly with uniform distribution from a particular range.

For information on the operations, which you can perform with the random module, see the below Functions.

Functions

[2]

createDecimal

Generates a random decimal number between 0.0 and 1.0.

createIntInRange

Generates a random number between the given start(inclusive) and end(exclusive) values.

Errors

[2]

ArithmeticError

Represents the arithmetic error.

Error

Represents Random module related errors.