# FloatSize2d

Artifact: [androidx.xr.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/xr-runtime) [View Source](https://cs.android.com/search?q=file:androidx/xr/runtime/math/FloatSize2d.kt+class:androidx.xr.runtime.math.FloatSize2d) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

*** ** * ** ***


```
class FloatSize2d
```

<br />

*** ** * ** ***

2D size represented as a Float (e.g., panel dimensions in meters).

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#FloatSize2d(kotlin.Float,kotlin.Float)(width: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, height: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |

| ### Public functions |
|---|---|
| `operator https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Float)(divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly divided by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Float)`. |
| `operator https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Int)(divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly divided by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Int)`. |
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#hashCode()()` |
| `operator https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Float)(scalar: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly multiplied by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Float)`. |
| `operator https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Int)(scalar: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly multiplied by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Int)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize3d` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#to3d(kotlin.Float)(depth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Converts to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize3d` using `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()`, `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()`, and the given `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#to3d(kotlin.Float)`. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()` the height of the object |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()` the width of the object |

## Public constructors

### FloatSize2d

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
FloatSize2d(width: Float = 0.0f, height: Float = 0.0f)
```

## Public functions

### div

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
operator fun div(divisor: Float): FloatSize2d
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly divided by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Float)`.

| Parameters |
|---|---|
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the value to divide the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()` and `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()` by |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` with the divided dimensions |

### div

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
operator fun div(divisor: Int): FloatSize2d
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly divided by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#div(kotlin.Int)`.

| Parameters |
|---|---|
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the value to divide the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()` and `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()` by |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` with the divided dimensions |

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### times

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
operator fun times(scalar: Float): FloatSize2d
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly multiplied by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Float)`.

| Parameters |
|---|---|
| `scalar: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the value to multiply the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()` and `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()` by |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` with the multiplied dimensions |

### times

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
operator fun times(scalar: Int): FloatSize2d
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` that's uniformly multiplied by the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#times(kotlin.Int)`.

| Parameters |
|---|---|
| `scalar: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the value to multiply the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()` and `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()` by |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` | a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d` with the multiplied dimensions |

### to3d

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
fun to3d(depth: Float = 0.0f): FloatSize3d
```

Converts to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize3d` using `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#width()`, `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#height()`, and the given `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize2d#to3d(kotlin.Float)`.

| Parameters |
|---|---|
| `depth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | the depth of the new 3D size |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize3d` | a new `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/FloatSize3d` with the specified dimensions |

### toString

```
open fun toString(): String
```

## Public properties

### height

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
val height: Float
```

the height of the object

### width

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

```
val width: Float
```

the width of the object