@thi.ng/vectors
Version:
Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
37 lines • 994 B
TypeScript
import type { FnN6, FnU3 } from "@thi.ng/api";
import type { ReadonlyVec } from "./api.js";
/**
* Returns 2x the signed area of the 2D triangle defined by the given points.
*
* @remarks
* This is a useful classifier for many geometry processing tasks. In addition
* to the triangle area, the result can also be interpreted as follows:
*
* - `> 0`: points are ordered counterclockwise
* - `< 0`: points are ordered clockwise
* - `0`: points are co-linear
*
* Functionally same as: `cross2(sub2([], b, a), sub2([], c, a))`
*
* - {@link corner2}
* - {@link clockwise2}
* - {@link cross2}
*
* @param a -
* @param b -
* @param c -
*/
export declare const signedArea2: FnU3<ReadonlyVec, number>;
/**
* Same as {@link signedArea2}, but expects individual vector component args,
* instead of vectors.
*
* @param ax -
* @param ay -
* @param bx -
* @param by -
* @param cx -
* @param cy -
*/
export declare const signedAreaC2: FnN6;
//# sourceMappingURL=signed-area.d.ts.map