Function

constrainDepth

Constrains a given depth value to fit within the bounds of this VolumeConstraints object.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

constrainDepth

Android
public fun VolumeConstraints.constrainDepth(depth: Int): Int

Constrains a given depth value to fit within the bounds of this VolumeConstraints object.

Parameters

depth the depth value to constrain.

Returns

the constrained depth value, ensuring it's within the minimum and maximum depth bounds.