onekiloparsec / SwiftAA

The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
http://www.onekiloparsec.dev/
MIT License
172 stars 31 forks source link

fixed Moon.timeOfPhase() #41

Closed alex-vasenin closed 7 years ago

alex-vasenin commented 7 years ago
  1. fixed bug: Moon.timeOfPhase() should be public
  2. fixed bug: Moon.timeOfPhase() returns next or previous phase unpredictably
  3. Added tests for Moon.timeOfPhase()

note: just ceiling/flooring k doesn't work, we have to calculate it second time in some cases