Unify on GenericPoint type

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2024-09-24 18:38:29 +02:00
parent 0c47bd0004
commit 017047d15e
No known key found for this signature in database
7 changed files with 68 additions and 115 deletions

View file

@ -1,4 +1,4 @@
import type { GlobalPoint, LocalPoint, Triangle } from "./types";
import type { GenericPoint, Triangle } from "./types";
// Types
@ -11,7 +11,7 @@ import type { GlobalPoint, LocalPoint, Triangle } from "./types";
* @param p The point to test whether is in the triangle
* @returns TRUE if the point is inside of the triangle
*/
export function triangleIncludesPoint<P extends GlobalPoint | LocalPoint>(
export function triangleIncludesPoint<P extends GenericPoint>(
[a, b, c]: Triangle<P>,
p: P,
): boolean {