getFloat

fun getFloat(key: String, defaultValue: Float = 0.0f): Float

Retrieves a Float value by key, falling back to defaultValue if missing.

Return

The stored float or defaultValue.

Parameters

key

The key to look up.

defaultValue

The fallback value. Defaults to 0f.