major optimization updates
[debian/openrocket] / src / net / sf / openrocket / optimization / general / multidim / SearchPattern.java
index 592f4eaa02012e34bb01b62e5466677c0c2ed865..1a7df3331f203fea437a6b40ecfb5a53b354448b 100644 (file)
@@ -58,7 +58,7 @@ public class SearchPattern {
                        for (int j = 0; j < i; j++) {
                                value -= MathUtil.pow2(coordinates[j]);
                        }
-                       value = Math.sqrt(value);
+                       value = MathUtil.safeSqrt(value);
                        
                        coordinates[i] = value;
                        pattern.add(new Point(coordinates));