fixes for two nasty line() bugs

This commit is contained in:
benfry
2004-07-13 05:03:13 +00:00
parent 9538c155d7
commit ba99628aec
4 changed files with 25 additions and 18 deletions

View File

@@ -142,9 +142,9 @@ public class PPolygon implements PConstants {
// vertexCount-1 is the current vertex that would be used
// vertexCount-2 would be the previous feller
if ((Math.abs(vertices[vertexCount-2][MX] - x) < 0.0001f) &&
(Math.abs(vertices[vertexCount-2][MY] - y) < 0.0001f) &&
(Math.abs(vertices[vertexCount-2][MZ] - z) < 0.0001f)) {
if ((Math.abs(vertices[vertexCount-2][MX] - x) < EPSILON) &&
(Math.abs(vertices[vertexCount-2][MY] - y) < EPSILON) &&
(Math.abs(vertices[vertexCount-2][MZ] - z) < EPSILON)) {
vertexCount--;
return true;
}