Use Double.round(placeInt)
to Round a double with given placeInt
. See this example :
fun testMath() {
val x = 1.25
val y = x.round(1) // y is 1.3
val z = x.round(0) // z is 1.0
}
Use calculateDistance()
to calculate distance between two points on Google Map.