Skip to content

Commit 91b13c2

Browse files
committed
formatting of condition
1 parent 0e482ea commit 91b13c2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mode/libraries/ar/src/processing/ar/ARGraphics.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,24 +346,23 @@ private boolean isPoseInsideAugmentedImage(Pose pose, AugmentedImage image) {
346346
float cornerZ = corners[i + 2];
347347

348348
if (cornerX < imageMinX) {
349-
imageMinX = cornerX;
349+
imageMinX = cornerX;
350350
}
351351
if (cornerX > imageMaxX) {
352-
imageMaxX = cornerX;
352+
imageMaxX = cornerX;
353353
}
354354
if (cornerZ < imageMinZ) {
355-
imageMinZ = cornerZ;
355+
imageMinZ = cornerZ;
356356
}
357357
if (cornerZ > imageMaxZ) {
358-
imageMaxZ = cornerZ;
358+
imageMaxZ = cornerZ;
359359
}
360360
}
361361

362362
// Check if the Pose's position (X, Z) is within the bounds of the AugmentedImage's rectangle
363363
float poseX = pose.tx();
364364
float poseZ = pose.tz();
365-
366-
return (poseX >= imageMinX && poseX <= imageMaxX && poseZ >= imageMinZ && poseZ <= imageMaxZ);
365+
return (imageMinX <= poseX && poseX <= imageMaxX && imageMinZ <= poseZ && poseZ <= imageMaxZ);
367366
}
368367

369368

0 commit comments

Comments
 (0)