com.nohrd.bike.Distance.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of domain Show documentation
Show all versions of domain Show documentation
A library for reading data from a NOHrD Bike
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())
}
}
}