All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nohrd.bike.Distance.kt Maven / Gradle / Ivy

The newest version!
package com.nohrd.bike

@Suppress("DataClassPrivateConstructor")
public data class Distance private constructor(
    val millimeters: Double,
) {

    val meters: Double get() = millimeters / 1000

    public companion object {

        @JvmStatic
        public fun fromMillimeters(value: Number): Distance {
            return Distance(value.toDouble())
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy