Skip to content

Commit

Permalink
ConvexPolyhedron calculateWorldAABB() can return undefined values (Le…
Browse files Browse the repository at this point in the history
  • Loading branch information
stockhuman committed Mar 7, 2020
1 parent 63c5d1b commit 5e3dddf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/shapes/ConvexPolyhedron.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,19 +662,25 @@ export class ConvexPolyhedron extends Shape {
const v = tempWorldVertex
if (v.x < minx || minx === undefined) {
minx = v.x
} else if (v.x > maxx || maxx === undefined) {
}

if (v.x > maxx || maxx === undefined) {
maxx = v.x
}

if (v.y < miny || miny === undefined) {
miny = v.y
} else if (v.y > maxy || maxy === undefined) {
}

if (v.y > maxy || maxy === undefined) {
maxy = v.y
}

if (v.z < minz || minz === undefined) {
minz = v.z
} else if (v.z > maxz || maxz === undefined) {
}

if (v.z > maxz || maxz === undefined) {
maxz = v.z
}
}
Expand Down

0 comments on commit 5e3dddf

Please sign in to comment.