[fix][mass] Added a negative-mass check, which rarely happens during inconstitent component updates -- during scaling
This commit is contained in:
parent
834f4763f5
commit
4825c7a1ee
@ -1930,7 +1930,7 @@ public abstract class RocketComponent implements ChangeSource, Cloneable, Iterab
|
||||
|
||||
protected static final double ringMass(double outerRadius, double innerRadius,
|
||||
double length, double density) {
|
||||
return Math.PI * (MathUtil.pow2(outerRadius) - MathUtil.pow2(innerRadius)) *
|
||||
return Math.PI * Math.max(MathUtil.pow2(outerRadius) - MathUtil.pow2(innerRadius),0) *
|
||||
length * density;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user