copy

fun copy(position: Double = this.position.magnitude, velocity: Double = this.velocity.magnitude, acceleration: Double = this.acceleration.magnitude): MotionState<U>(source)

Creates a copy of this motion state with optionally modified values using raw doubles.

The double values are interpreted in the same units as the current state's position, velocity, and acceleration.

Return

A new MotionState with the specified values

Parameters

position

The new position magnitude (defaults to current position magnitude)

velocity

The new velocity magnitude (defaults to current velocity magnitude)

acceleration

The new acceleration magnitude (defaults to current acceleration magnitude)