core / com.acmerobotics.roadrunner.geometry / Vector2d

Vector2d

data class Vector2d

Class for representing 2D vectors (x and y).

Constructors

<init>

Vector2d(x: Double = 0.0, y: Double = 0.0)

Class for representing 2D vectors (x and y).

Properties

x

val x: Double

y

val y: Double

Functions

angle

fun angle(): Double

distTo

infix fun distTo(other: Vector2d): Double

div

operator fun div(scalar: Double): Vector2d

dot

infix fun dot(other: Vector2d): Double

epsilonEquals

infix fun epsilonEquals(other: Vector2d): Boolean

minus

operator fun minus(other: Vector2d): Vector2d

norm

fun norm(): Double

plus

operator fun plus(other: Vector2d): Vector2d

projectOnto

infix fun projectOnto(other: Vector2d): Vector2d

rotated

fun rotated(angle: Double): Vector2d

times

operator fun times(scalar: Double): Vector2d

toString

fun toString(): String

unaryMinus

operator fun unaryMinus(): Vector2d