Reduce decimal points number for double value
This file contains 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
DecimalFormat df = new DecimalFormat("#.####"); | |
df.setRoundingMode(RoundingMode.CEILING); | |
double newLat = Double.valueOf(df.format(coordinates.latitude)); | |
double newLong = Double.valueOf(df.format(coordinates.longitude)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment