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

NumericType suggestion #16

Closed alex-vasenin closed 7 years ago

alex-vasenin commented 7 years ago

I think NumericType.value should be immutable. We don't actually use this mutability anywhere, but it makes implementations a bit more complicated. What you think?

onekiloparsec commented 7 years ago

Of course, this makes a lot of sense. NumericType is intended to behave like any other builtin numeric types (Float, Double), but with basic transforms in the tricky business of physical units. Please, feel free to go ahead. I'm having an intense end of the year at work, and I couldn't do much during the week anyway.