computeProportion

open fun computeProportion(startValue: Double, lastValue: Double): Double

Method to get proportion between two values

Return

proportion value as double

Parameters

startValue

: first value to make compare

lastValue

: last value to compare and calculate proportion with start value

Throws

if startValue or lastValue are negative


open fun computeProportion(startValue: Double, lastValue: Double, decimalDigits: Int): Double

Method to get proportion between two values and round it

Return

proportion value as double

Parameters

startValue

: first value to make compare

lastValue

: last value to compare and calculate proportion with start value

decimalDigits

: number of digits to round final percent value

Throws

if startValue or lastValue are negative