/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.utils/MapUtils/calculateAgeFactor

calculateAgeFactor

\ fun calculateAgeFactor(ageInSeconds: Long, startFadeDuration: Int = 120, maxFadeDuration: Int = 180): Float

Calculates the age factor based on the elapsed time.

Return

The calculated age factor, clamped between 0.0 and 1.0.

Parameters

androidJvm

ageInSeconds The elapsed time in seconds.
startFadeDuration The duration (in seconds) before fading starts (e.g., 120 seconds).
maxFadeDuration The duration (in seconds) after which the factor becomes 0 (e.g., 180 seconds).