computeAssetPercent

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

Method to get percent between two values

Return

percent value as double e.g. 8 or -8

Parameters

startValue

: first value to make compare

lastValue

: last value to compare and get percent by first value

Throws

if startValue or lastValue are negative


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

Method to get percent between two values and round it

Return

percent value as double e.g. 8 or -8

Parameters

startValue

: first value to make compare

lastValue

: last value to compare and get percent by first value

decimalDigits

: number of digits to round final percent value

Throws

if startValue or lastValue are negative