Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance bug #30

Closed
vincentvanzyl opened this issue Aug 31, 2015 · 2 comments
Closed

Distance bug #30

vincentvanzyl opened this issue Aug 31, 2015 · 2 comments

Comments

@vincentvanzyl
Copy link
Contributor

Hi

On line 91 on your GoogleParser class:
segment.setDistance(distance / 1000);

distance is and int and 1000 is also an int and the segment distance is a double. And as a consequence, the distances are not calculated correctly. I have values like 0.0, 1.0, 9.0, etc

You need to cast both to doubles:
segment.setDistance((double)distance / (double)1000);

Thanks for a great library

@jd-alexander
Copy link
Owner

would be nice if you could submit fix via a pull request

@vincentvanzyl
Copy link
Contributor Author

Ok, done:
#31

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants