Make static methods that ought to be static. Check if was intialized otherwise - #35
Open
facontidavide wants to merge 2 commits into
Open
Make static methods that ought to be static. Check if was intialized otherwise#35facontidavide wants to merge 2 commits into
facontidavide wants to merge 2 commits into
Conversation
facontidavide
force-pushed
the
use_static
branch
from
February 2, 2018 16:05
5f69d18 to
5f2d97d
Compare
|
@rikba Could you have a look? |
|
Please 😄 |
rikba
suggested changes
Nov 30, 2018
rikba
left a comment
Contributor
There was a problem hiding this comment.
Thanks for your contribution and exposing the functionality and throwing initialization errors. I think that's very valuable. SCOLGTM.
|
|
||
| inline double rad2Deg(const double radians) | ||
| { | ||
| return (radians / M_PI) * 180.0; |
Contributor
There was a problem hiding this comment.
Please make this a constant, i.e.,
const double kRad2Deg = 180.0 / M_PI;
Saves some devisions.
|
|
||
| inline double deg2Rad(const double degrees) | ||
| { | ||
| return (degrees / 180.0) * M_PI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
thanks for this nice utility.
I noticed that there are tow function that can be used outside the class GeodeticConverter.
I think it is more flexible to keep them static members or, even better, stand alone functions.
I also added exceptions when the other methods are used without initialization.
By personal opinion is that initialization is mandatory and that the constructor should force that, but I don't want to break the code of libraries which depend on this one.
Cheers
Davide