This companion object of class Velocity
exists primarily to provide convenience
methods for creating new instances of Velocity
.
The object has an alias in the top-level package o1, so it’s accessible to students
simply via import o1.*
.
- Companion:
- class
Type members
Inherited types
Value members
Concrete methods
Returns the average of all the given velocities. If the given collection is empty, returns Velocity.Still.
Returns the average of all the given velocities. If the given collection is empty, returns Velocity.Still.
Returns the sum of all the given velocities. If the given collection is empty, returns Velocity.Still.
Returns the sum of all the given velocities. If the given collection is empty, returns Velocity.Still.
Concrete fields
a zero-speed Velocity with a direction of NoDirection
a zero-speed Velocity with a direction of NoDirection