Ellipse refactor

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs 2024-09-24 19:12:27 +02:00
parent 017047d15e
commit 3efa8735ef
No known key found for this signature in database
10 changed files with 301 additions and 217 deletions

View file

@ -143,3 +143,13 @@ export type Extent = {
} & {
_brand: "excalimath_extent";
};
// an ellipse is specified by its center, angle, and its major and minor axes
// but for the sake of simplicity, we've used halfWidth and halfHeight instead
// in replace of semi major and semi minor axes
export type Ellipse<Point extends GenericPoint> = {
center: Point;
angle: Radians;
halfWidth: number;
halfHeight: number;
};