---
title: "takeOrElse"
description: "If this [ScaleFactor] [isSpecified] then this is returned, otherwise [block] is executed and its
result is returned."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


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


If this `ScaleFactor` `isSpecified` then this is returned, otherwise `block` is executed and its
result is returned.



