@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
69 lines • 2.33 kB
TypeScript
import type { MultiVecOpFNO, VecOpFNO } from "./api.js";
/**
* Sets `v` to random 2D vector, with each component drawn from given random
* distribution function (default: gaussian/normal distribution) and scaled to
* `n` (default: 1). Creates new vector if `v` is null.
*
* @remarks
* References:
*
* - https://docs.thi.ng/umbrella/random/#random-distributions
* - https://docs.thi.ng/umbrella/random/functions/normal.html
*
* @param o - output vector
* @param rnd - random distribution function
* @param n - scale factor
*/
export declare const randDistrib2: VecOpFNO;
/**
* Sets `v` to random 3D vector, with each component drawn from given random
* distribution function (default: gaussian/normal distribution) and scaled to
* `n` (default: 1). Creates new vector if `v` is null.
*
* @remarks
* References:
*
* - https://docs.thi.ng/umbrella/random/#random-distributions
* - https://docs.thi.ng/umbrella/random/functions/normal.html
*
* @param o - output vector
* @param rnd - random distribution function
* @param n - scale factor
*/
export declare const randDistrib3: VecOpFNO;
/**
* Sets `v` to random 4D vector, with each component drawn from given random
* distribution function (default: gaussian/normal distribution) and scaled to
* `n` (default: 1). Creates new vector if `v` is null.
*
* @remarks
* References:
*
* - https://docs.thi.ng/umbrella/random/#random-distributions
* - https://docs.thi.ng/umbrella/random/functions/normal.html
*
* @param o - output vector
* @param rnd - random distribution function
* @param n - scale factor
*/
export declare const randDistrib4: VecOpFNO;
/**
* Sets `v` to random nD vector, with each component drawn from given random
* distribution function (default: gaussian/normal distribution) and scaled to
* `n` (default: 1). Creates new vector if `v` is null.
*
* @remarks
* This version of this function can ONLY be used if `v` is given and
* initialized to the desired size/length.
*
* References:
*
* - https://docs.thi.ng/umbrella/random/#random-distributions
* - https://docs.thi.ng/umbrella/random/functions/normal.html
*
* @param o - output vector
* @param rnd - random distribution function
* @param n - scale factor
*/
export declare const randDistrib: MultiVecOpFNO;
//# sourceMappingURL=rand-distrib.d.ts.map