@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
72 lines • 2.54 kB
TypeScript
import type { ReadonlyVec, Vec } from "./api.js";
/**
* Vector version of
* [`mixCubicHermite`](https://docs.thi.ng/umbrella/math/functions/mixCubicHermite.html).
*
* @param out - result
* @param a -
* @param ta - tangent A
* @param b -
* @param tb - tangent B
* @param t - interpolation coeff `[0,1]`
*/
export declare const mixCubicHermite: (out: Vec | null, a: ReadonlyVec, ta: ReadonlyVec, b: ReadonlyVec, tb: ReadonlyVec, t: number) => Vec<number>;
/**
* Convenience version of {@link mixCubicHermite}, using 4 input points and
* {@link tangentCardinal} to compute the tangents for points `b` and `c` (with
* optional `scale`, default 0.5). Interpolated result point is that of `b` and
* `c`, with `a` and `d` only being used for tangent calculations.
*
* If `out` is null, stores result in `b`.
*
* @param out - result
* @param a -
* @param b -
* @param c -
* @param d -
* @param t - interpolation coeff `[0,1]`
* @param scale - tangent tightness / scale
*/
export declare const mixHermiteCardinal: (out: Vec | null, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, d: ReadonlyVec, t: number, scale?: number) => Vec<number>;
/**
* Convenience version of {@link mixCubicHermite}, using 4 input points and
* {@link tangentDiff3} to compute the tangents for points `b` and `c`.
* Interpolated result point is that of `b` and `c`, with `a` and `d` only being
* used for tangent calculations.
*
* If `out` is null, stores result in `b`.
*
* @param out - result
* @param a -
* @param b -
* @param c -
* @param d -
* @param t - interpolation coeff `[0,1]`
*/
export declare const mixHermiteDiff3: (out: Vec, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, d: ReadonlyVec, t: number) => Vec<number>;
/**
* Vector version of
* [`tangentCardinal`](https://docs.thi.ng/umbrella/math/functions/tangentCardinal.html).
*
* @param out -
* @param prev -
* @param next -
* @param scale -
* @param ta -
* @param tc -
*/
export declare const tangentCardinal: (out: Vec, prev: ReadonlyVec, next: ReadonlyVec, scale?: number, ta?: number, tc?: number) => Vec<number>;
/**
* Vector version of
* [`tangentDiff3`](https://docs.thi.ng/umbrella/math/functions/tangentDiff3.html).
*
* @param out - result
* @param prev -
* @param curr -
* @param next -
* @param ta -
* @param tb -
* @param tc -
*/
export declare const tangentDiff3: (out: Vec, prev: ReadonlyVec, curr: ReadonlyVec, next: ReadonlyVec, ta?: number, tb?: number, tc?: number) => Vec<number>;
//# sourceMappingURL=mix-hermite.d.ts.map