percentToValueOfRange

fun Float.percentToValueOfRange(min: Float = 0.0f, max: Float): Float

Calculates a value in a given range by percentage.

Return

Concrete value by a given percentage. If percentage value 0f, 1f then the returned value will be in min, max range.

Parameters

percent
  • Percentage. Expecting a value 0f,1f if expected to be in range.

min
  • Min Range Value.

max
  • Max Range Value.