Orbit(Periapsis) < 100000 returns false on the launch pad, for example, yet it's certainly not true that the Pe is greater than 100000.
Orbit(Periapsis) returns NaN when the periapsis is negative, but this cannot be detected in Vizzy.
Most programming languages do not allow testing against NaN (x==NaN will always return false), rather you need to use a special function.
So this is really too bugs, that Pe is not negative on the launch pad, and that NaN cannot be detected.
GENERAL INFO
- Created On: Windows
- Game Version: 0.8.402.0
- Planetary System: SolarSystem
- Planets: 6
- Game Time: 0.0 days
CRAFTS
Name | Location | Part Count | Mass | Altitude | Velocity |
---|---|---|---|---|---|
SimpleHeavy | Droo | 31 | 47,438kg | 217 km | 3.88 km/s |
SimpleHeavy | Droo | 52 | 0kg | 85 km | 1.14 km/s |
Craft-33 | Droo | 20 | 0kg | 59 km | 475.0 m/s |
Craft-34 | Droo | 20 | 0kg | 63 km | 448.0 m/s |
SimpleHeavy | Droo | 92 | 6.58E+5kg | 2,639 m | 174.0 m/s |
SimpleHeavy | Droo | 92 | 7.42E+5kg | 530 m | 163.0 m/s |
2 Comments
- Log in to leave a comment
-
0 golias
You can test it using the following trick:
isNan (x) = (length of (format ({0:f5}) (x))) = (3)
A non-NaN number will be formatted in something like "87.12345", whose length is always different than 3. The NaN is the only "number" whose formatting to 5 decimal places yields a string with 3 characters.
Other option:
isNaN (x) = (not ((x) = (x)))
Hackinsh, but works :)
@golias counter intuitive and not user friendly.
in most software environments NAN is a bug. Making NAN a feature is problematic and adds unessesary complexity to our scripts.