geodetic computations
[debian/openrocket] / src / net / sf / openrocket / rocketcomponent / Streamer.java
index dd071a40716481ef9d3abbd1806a27da1fb9c2ff..8d73c45718b009a44c80aa5314c0314a19de3833 100644 (file)
@@ -60,7 +60,7 @@ public class Streamer extends RecoveryDevice {
                
                ratio = Math.max(ratio, 0.01);
                double area = getArea();
-               stripWidth = Math.sqrt(area / ratio);
+               stripWidth = MathUtil.safeSqrt(area / ratio);
                stripLength = ratio * stripWidth;
                fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
        }
@@ -76,7 +76,7 @@ public class Streamer extends RecoveryDevice {
                        return;
                
                double ratio = Math.max(getAspectRatio(), 0.01);
-               stripWidth = Math.sqrt(area / ratio);
+               stripWidth = MathUtil.safeSqrt(area / ratio);
                stripLength = ratio * stripWidth;
                fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
        }