Captain is currently in ALPHA. We are happy to get your feedback
Core API
Number

Module: number

Table of contents

Functions

Functions

randomSeed

randomSeed(): number

Generates a random seed as a positive integer. The seed ranges from 1 to 2^32 (4294967296). This function uses JavaScript's Math.random() to generate a fractional random number and scales it up to the desired range.

Returns

number

A random seed as an integer between 1 and 4294967296 inclusive.

Defined in

src/shared/number.ts:8 (opens in a new tab)