Velocity

Function

Common
fun Velocity(x: Float, y: Float) = Velocity(packFloats(x, y))

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

Parameters

xHorizontal component of the velocity in pixels per second
yVertical component of the velocity in pixels per second