# Percentage

@Serializable
@ JvmInline
value class Percentage (source)

Contains of1 as main value, where 100% of percentage is when of1 == 1

#### See also

invoke
partOfTotal
of100

## Types

Companion
Link copied to clipboard
object Companion

## Properties

of1
Link copied to clipboard
val of1 : Double

Value of percentage. When it equals to 1, means 100%

of100
Link copied to clipboard
val of100 : Double

Represent this percentage as common percentage where 100% is 100%

of100Float
Link copied to clipboard
val of100Float : Float

Same as of100, but float (using Double.toFloat)

of100Int
Link copied to clipboard
val of100Int : Int

Same as of100, but int (using Double.toInt)

of1Float
Link copied to clipboard
val of1Float : Float

Same as of1, but float (using Double.toFloat)

## Functions

compareTo
Link copied to clipboard
operator fun Percentage . compareTo (other: Percentage ): Int
div
Link copied to clipboard
operator fun Percentage . div (i: Byte ): Percentage
operator fun Percentage . div (i: Double ): Percentage
operator fun Percentage . div (i: Float ): Percentage
operator fun Percentage . div (i: Int ): Percentage
operator fun Percentage . div (i: Long ): Percentage
operator fun Percentage . div (i: Short ): Percentage
ensureStrictOrNull
Link copied to clipboard
fun Progress . ensureStrictOrNull (): Progress ?

Will return this if Percentage.of1 in `0 .. 1` range

ensureStrictOrThrow
Link copied to clipboard
fun Progress . ensureStrictOrThrow (): Progress

Will return this if Percentage.of1 in `0 .. 1` range. Otherwise, will throw error IllegalArgumentException due to require failure

minus
Link copied to clipboard
operator fun Percentage . minus (other: Percentage ): Percentage
operator fun Percentage . minus (i: Byte ): Percentage
operator fun Percentage . minus (i: Double ): Percentage
operator fun Percentage . minus (i: Float ): Percentage
operator fun Percentage . minus (i: Int ): Percentage
operator fun Percentage . minus (i: Long ): Percentage
operator fun Percentage . minus (i: Short ): Percentage
plus
Link copied to clipboard
operator fun Percentage . plus (other: Percentage ): Percentage
operator fun Percentage . plus (i: Byte ): Percentage
operator fun Percentage . plus (i: Double ): Percentage
operator fun Percentage . plus (i: Float ): Percentage
operator fun Percentage . plus (i: Int ): Percentage
operator fun Percentage . plus (i: Long ): Percentage
operator fun Percentage . plus (i: Short ): Percentage
rem
Link copied to clipboard
operator fun Percentage . rem (i: Byte ): Percentage
operator fun Percentage . rem (i: Double ): Percentage
operator fun Percentage . rem (i: Float ): Percentage
operator fun Percentage . rem (i: Int ): Percentage
operator fun Percentage . rem (i: Long ): Percentage
operator fun Percentage . rem (i: Short ): Percentage
times
Link copied to clipboard
operator fun Percentage . times (i: Byte ): Percentage
operator fun Percentage . times (i: Double ): Percentage
operator fun Percentage . times (i: Float ): Percentage
operator fun Percentage . times (i: Int ): Percentage
operator fun Percentage . times (i: Long ): Percentage
operator fun Percentage . times (i: Short ): Percentage