Commit b5e1f46f authored by Antoine's avatar Antoine

Fixes #120

parent d9d2aef0
...@@ -339,16 +339,8 @@ public class GraphicGraph extends AbstractElement implements Graph, ...@@ -339,16 +339,8 @@ public class GraphicGraph extends AbstractElement implements Graph,
*/ */
public void computeBounds() { public void computeBounds() {
if (boundsChanged) { if (boundsChanged) {
lo.x = lo.y = lo.z = Double.POSITIVE_INFINITY;// 1000000000; // A lo.x = lo.y = lo.z = Double.MAX_VALUE;
// bug with hi.x = hi.y = hi.z = -Double.MAX_VALUE;
// Double.MAX_VALUE
// during
// comparisons ?
hi.x = hi.y = hi.z = Double.NEGATIVE_INFINITY;// -1000000000; // A
// bug with
// Double.MIN_VALUE
// during
// comparisons ?
for (Node n : getEachNode()) { for (Node n : getEachNode()) {
GraphicNode node = (GraphicNode) n; GraphicNode node = (GraphicNode) n;
...@@ -393,17 +385,17 @@ public class GraphicGraph extends AbstractElement implements Graph, ...@@ -393,17 +385,17 @@ public class GraphicGraph extends AbstractElement implements Graph,
} }
} }
if ((hi.x - lo.x < 0.000001)) { if (hi.x - lo.x < 0.000001) {
hi.x = 1; hi.x = hi.x + 1;
lo.x = -1; lo.x = lo.x - 1;
} }
if ((hi.y - lo.y < 0.000001)) { if (hi.y - lo.y < 0.000001) {
hi.y = 1; hi.y = hi.y + 1;
lo.y = -1; lo.y = lo.y - 1;
} }
if ((hi.z - lo.z < 0.000001)) { if (hi.z - lo.z < 0.000001) {
hi.z = 1; hi.z = hi.z + 1;
lo.z = -1; lo.z = lo.z - 1;
} }
boundsChanged = false; boundsChanged = false;
......
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