Comment Comment by dima_vm You can make that in Kotlin, e.g.: `3.mph` or `(-45..45).deg` for ranges.with definition like: val Double.mph: Speed get() = Speed.mph(this) data class Speed(val ms: Double) companion object { fun mph(mph: Double) = Speed(mph * 1609.344 / 3600.0) } parent dima_vm 3 years ago
with definition like: