juergenpf / Geodesy

Other
29 stars 14 forks source link

Remove broken lazy-initialization pattern for MathConsts #1

Closed txelu closed 7 years ago

txelu commented 8 years ago

Any call to FromEuclidean method would fail unless a previous call to ToEuclidean is executed, as private _m fields was only properly initialized when ToEuclidean was called. The content of MathConsts doesn't seem to be so time-consuming or use so much memory to require a lazy-initialization pattern, so I directly instantiated the MathConsts in _m field in the constructor.

juergenpf commented 7 years ago

Merged