Companion

object Companion

Properties

Link copied to clipboard
val ZERO: Ratio

The Ratio of 0.

Functions

Link copied to clipboard
fun percent(value: Double): Ratio

Creates a Ratio instance from the given value expressed as a percentage.

fun percent(value: Int): Ratio
fun percent(value: Long): Ratio

Creates a Ratio instance from the given value as a percentage.

Link copied to clipboard
fun unitRange(value: Double): Ratio
fun unitRange(value: Int): Ratio
fun unitRange(value: Long): Ratio

Creates a Ratio instance from the given value in the unit range.