Skip to main content
Version: 0.11.x

Function: randomNormal()

randomNormal(size, options?): Float32Array

Defined in: extensions/math.ts:164

Draws normally distributed values using the Box–Muller transform, seeded via mulberry32 so a fixed seed reproduces the same sequence.

Parameters​

size​

number

The number of values to draw.

options?​

RandomNormalOptions

Distribution parameters. When options or any individual properties are omitted, defaults to mean: 0, std: 1, and a random seed. See RandomNormalOptions.

Returns​

Float32Array

A Float32Array of size normally distributed values.

We are Software Mansion.