SimpleKeplerOrbits icon indicating copy to clipboard operation
SimpleKeplerOrbits copied to clipboard

Fix Epsilon, add IsZeroApprox semantic, and update to Unity 2018.3.14f1

Open aaronfranke opened this issue 5 years ago • 3 comments

  • 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 formula 53*log(2) gives 15.95, so a value of 1e-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 than Epsilon 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)

aaronfranke avatar Oct 25 '19 18:10 aaronfranke

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.

Karth42 avatar Nov 03 '19 17:11 Karth42

but unfortunately this repository is not open for contributions.

Would you mind placing that in the README file?

aaronfranke avatar Nov 03 '19 17:11 aaronfranke

sure.

Karth42 avatar Nov 03 '19 17:11 Karth42