<div class='type'>Function</div>


<a id='references'></a>


<h2 id="coercein-minimumvalue-maximumvalue">coerceIn</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
inline fun Dp.coerceIn(minimumValue: Dp, maximumValue: Dp): Dp
```


Ensures that this value lies in the specified range `minimumValue`..`maximumValue`.

#### Returns

| | |
| --- | --- |
|  | this value if it's in the range, or `minimumValue` if this value is less than `minimumValue`, or `maximumValue` if this value is greater than `maximumValue`. |