Skip to content

Commit

Permalink
fix isVectorInsideArea function
Browse files Browse the repository at this point in the history
  • Loading branch information
surz90 committed Aug 7, 2024
1 parent fc424fd commit 97753ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export function rotateVectorAroundCenter(vec: Vector3, vecCenter: Vector3, rot:

export function isVectorInsideArea(vec: Vector3, areaPt1: Vector3, areaPt2: Vector3){

Check failure on line 11 in src/utilities/index.ts

View workflow job for this annotation

GitHub Actions / build

Insert `·`
let minX = Math.min(areaPt1.x, areaPt2.x)
let maxX = Math.max(areaPt1.x, areaPt1.x)
let maxX = Math.max(areaPt1.x, areaPt2.x)

let minZ = Math.min(areaPt1.z, areaPt2.z)
let maxZ = Math.max(areaPt1.z, areaPt1.z)
let maxZ = Math.max(areaPt1.z, areaPt2.z)

return vec.x > minX && vec.x < maxX && vec.z > minZ && vec.z < maxZ
}

0 comments on commit 97753ab

Please sign in to comment.