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


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


<h2 id="takeorelse-block">takeOrElse</h2>

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


```kotlin
inline fun Size.takeOrElse(block: () -> Size): Size
```


If this `Size`&nbsp;`isSpecified` then this is returned, otherwise `block` is executed and its
result is returned.





<hr class="docs-overload-divider">


<h2 id="takeorelse-block-2">takeOrElse</h2>

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


```kotlin
inline fun Offset.takeOrElse(block: () -> Offset): Offset
```


If this `Offset`&nbsp;`isSpecified` then this is returned, otherwise `block` is executed and its
result is returned.