---
title: "ScaleFactor"
description: "Holds 2 dimensional scaling factors for horizontal and vertical axes"
type: "class"
---

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


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

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


```kotlin
value class ScaleFactor(val packedValue: Long)
```


Holds 2 dimensional scaling factors for horizontal and vertical axes


## Properties

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


```kotlin
inline val scaleX: Float
```


Returns the scale factor to apply along the horizontal axis



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


```kotlin
inline val scaleY: Float
```


Returns the scale factor to apply along the vertical axis



## Functions

```kotlin
inline operator fun component1(): Float
```

```kotlin
inline operator fun component2(): Float
```

```kotlin
fun copy(scaleX: Float = this.scaleX, scaleY: Float = this.scaleY) = ScaleFactor(scaleX, scaleY)
```


Returns a copy of this ScaleFactor instance optionally overriding the scaleX or scaleY
parameters


```kotlin
operator fun times(operand: Float) = ScaleFactor(scaleX * operand, scaleY * operand)
```


Multiplication operator.

Returns a `ScaleFactor` with scale x and y values multiplied by the operand


```kotlin
operator fun div(operand: Float) = ScaleFactor(scaleX / operand, scaleY / operand)
```


Division operator.

Returns a `ScaleFactor` with scale x and y values divided by the operand


## Companion Object

#### Properties

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


```kotlin
val Unspecified = ScaleFactor(Float.NaN, Float.NaN)
```


A ScaleFactor whose `scaleX` and `scaleY` parameters are unspecified. This is a sentinel
value used to initialize a non-null parameter. Access to scaleX or scaleY on an
unspecified size is not allowed





