Skip to content

Commit

Permalink
fix(geom-closest-point): type hints (TS 3.5.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 16, 2019
1 parent d6b1f11 commit fa146d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/geom-closest-point/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export const closestPointRect = (
}
return minID! === 0
? setC2(out, minW!, clamp(p[1], bmin[1], bmax[1]))
: setC2(out, clamp(p[0], bmin[0], bmax[0]), minW);
: setC2(out, clamp(p[0], bmin[0], bmax[0]), minW!);
};

export const closestPointAABB = (
Expand Down Expand Up @@ -272,17 +272,17 @@ export const closestPointAABB = (
clamp(p[1], bmin[1], bmax[1]),
clamp(p[2], bmin[2], bmax[2])
)
: minID === 1
: minID! === 1
? setC3(
out,
clamp(p[0], bmin[0], bmax[0]),
minW,
minW!,
clamp(p[2], bmin[2], bmax[2])
)
: setC3(
out,
clamp(p[0], bmin[0], bmax[0]),
clamp(p[1], bmin[1], bmax[1]),
minW
minW!
);
};

0 comments on commit fa146d7

Please sign in to comment.