Skip to content

Instantly share code, notes, and snippets.

Created October 12, 2016 18:47
What would you like to do?
Reduce decimal points number for double value
DecimalFormat df = new DecimalFormat("#.####");
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