Google is committed to advancing racial equity for Black communities. See how.

Velocity

@Immutable data class Velocity
kotlin.Any
   ↳ androidx.ui.unit.Velocity

A velocity in two dimensions.

Summary

Public constructors
<init>(pixelsPerSecond: Offset)

A velocity in two dimensions.

Public methods
operator Velocity

Return the negation of a velocity.

Extension functions
From androidx.ui.unit
operator Velocity

Return the difference of two velocities.

operator Velocity

Return the sum of two velocities.

Properties
Offset

The number of pixels per second of velocity in the x and y directions.

Companion properties
Velocity

Velocity of 0 pixels per second in both x and y.

Public constructors

<init>

Velocity(pixelsPerSecond: Offset)

A velocity in two dimensions.

Public methods

unaryMinus

operator fun unaryMinus(): Velocity

Return the negation of a velocity.

Properties

pixelsPerSecond

val pixelsPerSecond: Offset

The number of pixels per second of velocity in the x and y directions.

Companion properties

Zero

val Zero: Velocity

Velocity of 0 pixels per second in both x and y.