projects
/
debian
/
openrocket
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
major optimization updates
[debian/openrocket]
/
src
/
net
/
sf
/
openrocket
/
aerodynamics
/
FlightConditions.java
diff --git
a/src/net/sf/openrocket/aerodynamics/FlightConditions.java
b/src/net/sf/openrocket/aerodynamics/FlightConditions.java
index 64e814559f58c812801107c11b8c7ee4419c30dc..45b9d20f4a213ce861b8d9ed273cbd13ec41ec94 100644
(file)
--- a/
src/net/sf/openrocket/aerodynamics/FlightConditions.java
+++ b/
src/net/sf/openrocket/aerodynamics/FlightConditions.java
@@
-57,7
+57,7
@@
public class FlightConditions implements Cloneable, ChangeSource, Monitorable {
* Sqrt(1 - M^2) for M<1
* Sqrt(M^2 - 1) for M>1
*/
* Sqrt(1 - M^2) for M<1
* Sqrt(M^2 - 1) for M>1
*/
- private double beta = Math
.s
qrt(1 - mach * mach);
+ private double beta = Math
Util.safeS
qrt(1 - mach * mach);
/** Current roll rate. */
/** Current roll rate. */
@@
-122,7
+122,7
@@
public class FlightConditions implements Cloneable, ChangeSource, Monitorable {
*/
public void setRefArea(double area) {
refArea = area;
*/
public void setRefArea(double area) {
refArea = area;
- refLength = Math
.s
qrt(area / Math.PI) * 2;
+ refLength = Math
Util.safeS
qrt(area / Math.PI) * 2;
fireChangeEvent();
}
fireChangeEvent();
}
@@
-237,9
+237,9
@@
public class FlightConditions implements Cloneable, ChangeSource, Monitorable {
this.mach = mach;
if (mach < 1)
this.mach = mach;
if (mach < 1)
- this.beta = Math
.s
qrt(1 - mach * mach);
+ this.beta = Math
Util.safeS
qrt(1 - mach * mach);
else
else
- this.beta = Math
.s
qrt(mach * mach - 1);
+ this.beta = Math
Util.safeS
qrt(mach * mach - 1);
fireChangeEvent();
}
fireChangeEvent();
}
@@
-378,6
+378,7
@@
public class FlightConditions implements Cloneable, ChangeSource, Monitorable {
*
* @return the number of times this object has been modified since instantiation.
*/
*
* @return the number of times this object has been modified since instantiation.
*/
+ @Override
public int getModID() {
return modID + modIDadd + this.atmosphericConditions.getModID();
}
public int getModID() {
return modID + modIDadd + this.atmosphericConditions.getModID();
}