Mendess
Jeremy Griffes
import kotlin.math.pow fun Double.toString(decimalPlaces: Int) = 10.0.pow(decimalPlaces).toInt().let { exp -> "${toInt()}.${(this * exp).toInt() % exp}" } 3.1415926.toString(decimalPlaces = 2) // Shows 3.14
A modern programming language that makes developers happier.