open class Vector2D
Class representing a 2x1 column vector, used for calculating what speeds to move the motors in.
Vector2D(x: Double, y: Double)
Constructs a vector based on a given x and y. |
val x: Double
The first element of the vector. (horizontal movement) |
|
val y: Double
The second element of the vector. (vertical movement) |
open static fun dotProduct(a: Vector2D, b: Vector2D): Double
Computes the dot product of two Vector2Ds. |
|
open fun rotatedBy(angle: Double): Vector2D
Returns a version of the vector rotated by a given angle in radians. |