{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

VelocityKt

public final class VelocityKt


Summary

Public methods

static final @NonNull Velocity
Velocity(float x, float y)

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

Public methods

Velocity

public static final @NonNull Velocity Velocity(float x, float y)

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

Parameters
float x

Horizontal component of the velocity in pixels per second

float y

Vertical component of the velocity in pixels per second