Skip to content

Commit

Permalink
feat: imrove naming, Update intersect.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Prozi committed Mar 1, 2024
1 parent 2817b83 commit e623366
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/intersect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { Point } from "./bodies/point";
/**
* replace body with array of related convex polygons
*/
export function ensureConvex<T extends Body = Circle | Point | Polygon>(
body: T,
): (T | SATPolygon)[] {
export function ensureConvex<TBody extends Body = Circle | Point | Polygon>(
body: TBody,
): (TBody | SATPolygon)[] {
if (body.isConvex || body.type !== BodyType.Polygon) {
return [body];
}
Expand Down

0 comments on commit e623366

Please sign in to comment.