@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
34 lines • 1.22 kB
TypeScript
import type { ReadonlyVec, Vec, VecOpRoVV } from "./api.js";
export declare const bisect2: VecOpRoVV<number>;
/**
* Returns normalized bisector vector for point `b` in the triangle `a`
* -> `b` -> `c`. If `out` is null, creates a new result vector. The `n`
* arg can be used to scale the result vector to given length (default:
* 1).
*
* @param out -
* @param a -
* @param b -
* @param c -
* @param n -
*/
export declare const cornerBisector: (out: Vec | null, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, n?: number) => Vec;
/**
* 2D version of {@link cornerBisector} which doesn't always bisect the
* smaller/inside angle, but also doesn't suffer sign/orientation
* flipping of returned bisector vector.
*
* @remarks
* Instead, the direction of the result is dependent on the orientation
* of the input triangle. If `a`, `b`, `c` are in CW order, the result
* will point away from the triangle's centroid. If CCW, the result will
* point towards the inside.
*
* @param out -
* @param a -
* @param b -
* @param c -
* @param n -
*/
export declare const cornerBisector2: (out: Vec | null, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, n?: number) => Vec;
//# sourceMappingURL=bisect.d.ts.map