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

Update to swift 4 #61

Closed rodericj closed 5 years ago

rodericj commented 7 years ago

This PR addresses a migration issue from swift 3.1 to swift 4. There seems to be some changes in the Numeric protocol forcing us to implement + - and *. I'd like to think that there is an easier way to implement this in swift as you'll see it is largely copy/pasted implementations.

onekiloparsec commented 7 years ago

Hi. Thanks a lot for your work! I'in vacations right now with no possibilities for opening an Xcode during the next 2 weeks.

I just read a tiny part of the PR on my phone. I am a bit puzzled that the multiplication of two Degrees returns also a Degree. Maybe just a NumericType would more correct?

rodericj commented 7 years ago

I'd like to label this as draft or something until I'm able to write the tests for some of the newer code.

onekiloparsec commented 7 years ago

Just created a "Work In Progress" label, as requested.

rodericj commented 7 years ago

Thank you. I think that is appropriate.

onekiloparsec commented 5 years ago

This PR is obsolete.