toString

fun Float.toString(precision: Int): String

Converts the float receiver as a string with precision number of digits after the decimal (rounded) (e.g. 35.72 with precision = 1 will be 35.7, 35.78 with precision = 2 will be 35.80)


fun Double.toString(precision: Int): String

Converts the number to a string with precision number of digits after the decimal (rounded) (e.g. 35.72 with precision = 1 will be 35.7, 35.78 with precision = 2 will be 35.80)