@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
24 lines • 764 B
TypeScript
import type { ReadonlyVec, Vec } from "./api.js";
/**
* Computes 2D normal by rotating direction vector `a` -> `b`, 90 deg
* counterclockwise, normalized to length `n` (default: 1). If `out` is
* null, creates new vector.
*
* @param out -
* @param a -
* @param b -
* @param n -
*/
export declare const normalCCW: (out: Vec, a: ReadonlyVec, b: ReadonlyVec, n?: number) => Vec<number>;
/**
* Computes 2D normal by rotating direction vector `a` -> `b`, 90 deg
* clockwise, normalized to length `n` (default: 1). If `out` is null,
* creates new vector.
*
* @param out -
* @param a -
* @param b -
* @param n -
*/
export declare const normalCW: (out: Vec, a: ReadonlyVec, b: ReadonlyVec, n?: number) => Vec<number>;
//# sourceMappingURL=normal.d.ts.map