UNPKG

@thi.ng/vectors

Version:

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

43 lines 1.42 kB
import type { IRandom } from "@thi.ng/random"; import type { VecOpOO } from "./api.js"; /** * Sets `v` to a random nD 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). * * @param v - * @param n - * @param rnd - */ export declare const randNorm: VecOpOO<number, IRandom>; /** * Sets `v` to a random 2D vector (using {@link random2}), normalized to length * `n` (default: 1). If no `rnd` instance is given, uses * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html). * * @param v - * @param n - * @param rnd - */ export declare const randNorm2: VecOpOO<number, IRandom>; /** * Sets `v` to a random 3D vector (using {@link random3}), normalized to length * `n` (default: 1). If no `rnd` instance is given, uses * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html). * * @param v - * @param n - * @param rnd - */ export declare const randNorm3: VecOpOO<number, IRandom>; /** * Sets `v` to a random 4D vector (using {@link random4}), normalized to length * `n` (default: 1). If no `rnd` instance is given, uses * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html). * * @param v - * @param n - * @param rnd - */ export declare const randNorm4: VecOpOO<number, IRandom>; //# sourceMappingURL=rand-norm.d.ts.map