mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Unify on GenericPoint type
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
0c47bd0004
commit
017047d15e
7 changed files with 68 additions and 115 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue