SimpleKeplerOrbits
SimpleKeplerOrbits copied to clipboard
Fix Epsilon, add IsZeroApprox semantic, and update to Unity 2018.3.14f1
-
The existing value for
Epsilon
is too small to be useful for float comparison. Double-precision floats have 53 significant digits including the implicit bit, and the formula53*log(2)
gives15.95
, so a value of1e-14
is appropriate as it has a decent margin of error. -
In an effort to increase code readability, I've added an
IsZeroApprox
semantic for when you need to check if a number is less thanEpsilon
but greater than-Epsilon
. C# will optimize this method away so there's no performance hit. -
Ensure all files are saved as proper UTF-8 with newline characters at the end of each file. Previously GitHub showed warnings and failed to interpret
Vector3d.cs
as a text file. -
Update project to Unity 2018.3.14f1 (previously was 2018.3.7f1, so only a patch release change)
thanks you very much for your effort to improve this project, but unfortunately this repository is not open for contributions. however I will leave your pull request open so your fork will be more visible to random visitors.
but unfortunately this repository is not open for contributions.
Would you mind placing that in the README file?
sure.