Commit 4ca96ebb authored by Matthias Betz's avatar Matthias Betz
Browse files

fixed a bug where the normal of a 45 degree slanted polygon would not...

fixed a bug where the normal of a 45 degree slanted polygon would not calculate the correct axis for projection in some cases
parent a66db57b
......@@ -74,9 +74,9 @@ public class Polygon2d {
double ny = Math.abs(normal.getY());
double nz = Math.abs(normal.getZ());
int[] axis;
if (nx > ny && nx > nz) {
if (nx >= ny && nx >= nz) {
axis = new int[] { 1, 2 };
} else if (ny > nx && ny > nz) {
} else if (ny >= nx && ny >= nz) {
axis = new int[] { 0, 2 };
} else {
axis = new int[] { 0, 1 };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment