``` interface UnitConversions { fun toMeters(...
# announcements
m
Copy code
interface UnitConversions {
    fun toMeters(): Double
    fun toCentimeters(): Double
}

inline class Meters(val value: Double): UnitConversions {
    override fun toMeters(): Double = value
    override fun toCentimeters(): Double = value * 100.0
}

inline class Centimeters(val value: Double): UnitConversions {
    override fun toMeters(): Double = value / 100.0
    override fun toCentimeters(): Double = value
}
­čĹŹ 1