---
title: "roundToIntSize"
description: "Convert a [Size] to an [IntSize]. This rounds [Size.width] and [Size.height] to the nearest
integer."
type: "function"
---

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


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


```kotlin
fun Size.roundToIntSize(): IntSize
```


Convert a `Size` to an `IntSize`. This rounds `Size.width` and `Size.height` to the nearest
integer.



