Converting a Number to Double

I would like to convert the next number to double.

Number mMax_Distance = ParseUser.getCurrentUser().getNumber("Maximum_Distance");

I use Parse, and it has a column known as Maximum_distance, which is classified as a number.

I need to convert it to a number because I would like to use it in the following line:

query.whereWithinKilometers("location", point, mMax_Distance); 

where mMax_Distance should be double

Another way to resolve this is to store it directly as a double instead of a number. However, it was classified using the value of the search parameter, where users determine their maximum distance through the search barrier, and I believe that the search barrier stores only numbers.

currentUser.put("Maximum_Distance", seekBarDistance.getProgress());

Any help would be greatly appreciated. If you need clarification, let me know.

+4

All Articles