UNPKG

@thi.ng/vectors

Version:

Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts

21 lines 882 B
import type { IRandom } from "@thi.ng/random"; import type { Vec } from "./api.js"; /** * Sets `v` to a random vector (using {@link random}), normalized to length `n` * (default: 1). If no `rnd` instance is given, uses * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html), i.e. * `Math.random`. * * @remarks * The non-fixed sized version of this function can ONLY be used if `v` is given * and initialized to the desired size/length. * * @param v - * @param n - * @param rnd - */ export declare const randNorm: (v: Vec | null, n?: number, rnd?: IRandom) => Vec; export declare const randNorm2: (v: Vec | null, n?: number, rnd?: IRandom) => Vec; export declare const randNorm3: (v: Vec | null, n?: number, rnd?: IRandom) => Vec; export declare const randNorm4: (v: Vec | null, n?: number, rnd?: IRandom) => Vec; //# sourceMappingURL=rand-norm.d.ts.map