unitVec

open fun unitVec(vector: Vector2d, unit: Distance): Vector2d

Convert a Vector2d of specified units to inches and radians. Convenient for having unit-defined poses that need to be of the same unit of default RoadRunner poses, such as adding vectors for relative movement.

Return

The converted vector

Parameters

vector

The vector to convert

unit

The unit of the vector


open fun unitVec(vector: Vector2d, unit: Distance, scalarDistMult: Double): Vector2d

Convert a Vector2d of specified units to inches and radians. Convenient for having unit-defined poses that need to be of the same unit of default RoadRunner poses, such as adding vectors for relative movement.

Return

The converted vector

Parameters

vector

The vector to convert

unit

The unit of the vector

scalarDistMult

The vector scalar, in the unit of the unit parameter.