wgblas
    Preparing search index...

    Function randomFloat32Array

    • Returns a Float32Array of n random values uniformly sampled from [low, high).

      Parameters

      • n: number

        number of elements

      • Optionallow: number

        lower bound (default: -1)

      • Optionalhigh: number

        upper bound (default: 1)

      Returns Float32Array

      import { randomFloat32Array } from "wgblas";

      const x = randomFloat32Array(4);
      console.log(x); // Float32Array [ -0.42, 0.81, -0.07, 0.55 ]
      import { randomFloat32Array } from "wgblas";

      const x = randomFloat32Array(4, 0, 10);
      console.log(x);