Skip to content

Commit

Permalink
Update src/helpers/helpers.core.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jacco van den Berg <[email protected]>
  • Loading branch information
stockiNail and LeeLenaleee authored Sep 18, 2024
1 parent 765e2e4 commit 784c822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/helpers.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function inPointRange(point, center, radius, hitSize) {
* @returns {boolean}
*/
export function inBoxRange(point, {x, y, x2, y2}, axis, {borderWidth, hitTolerance}) {
const hitSize = borderWidth / 2 + hitTolerance / 2;
const hitSize = (borderWidth + hitTolerance) / 2;
const inRangeX = point.x >= x - hitSize - EPSILON && point.x <= x2 + hitSize + EPSILON;
const inRangeY = point.y >= y - hitSize - EPSILON && point.y <= y2 + hitSize + EPSILON;
if (axis === 'x') {
Expand Down

0 comments on commit 784c822

Please sign in to comment.