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
| |
---|
x | Horizontal component of the velocity in pixels per second |
y | Vertical component of the velocity in pixels per second |