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


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


<h2 id="velocity-x-y">Velocity</h2>

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


```kotlin
fun Velocity(x: Float, y: Float) = Velocity(packFloats(x, y))
```


Constructs an Velocity from the given relative x and y velocities.

#### Parameters

| | |
| --- | --- |
| x | Horizontal component of the velocity in pixels per second |
| y | Vertical component of the velocity in pixels per second |