public class Vector2 implements Geometric<T>
Modifier and Type | Class and Description |
---|---|
static class |
Vector2.Companion |
Modifier and Type | Field and Description |
---|---|
static Vector2.Companion |
Companion |
Constructor and Description |
---|
Vector2(double x,
double y) |
Vector2(Vector2 other) |
Vector2() |
Vector2(int x,
int y) |
Vector2(Vector2 start,
Vector2 end) |
Modifier and Type | Method and Description |
---|---|
double |
distanceTo(Vector2 other) |
Vector2 |
div(double coef) |
double |
dot(Vector2 other) |
boolean |
equals(java.lang.Object other) |
Vector2 |
extrapolate(Vector2 other,
double x) |
double |
getAngle() |
double |
getMagnitude() |
Vector2 |
getNormalized() |
double |
getX() |
double |
getY() |
int |
hashCode() |
Vector2 |
interpolate(Vector2 other,
double x) |
Vector2 |
minus(Vector2 other) |
Vector2 |
plus(Vector2 other) |
Vector2 |
rotateBy(Rotation2d r) |
Vector2 |
times(int coef) |
Vector2 |
times(double coef) |
java.lang.String |
toCSV() |
java.lang.String |
toString() |
Vector2 |
translateBy(Vector2 other) |
Vector2 |
translateBy(double x,
double y) |
Vector2 |
unaryMinus() |
equals, hashCode, interpolate, toCSV, toString
interpolate
toCSV
public static Vector2.Companion Companion
public Vector2(double x, double y)
public Vector2(Vector2 other)
public Vector2()
public Vector2(int x, int y)
public double getMagnitude()
public double getAngle()
public Vector2 getNormalized()
public Vector2 times(int coef)
public Vector2 times(double coef)
public Vector2 div(double coef)
public Vector2 unaryMinus()
public double dot(Vector2 other)
public double distanceTo(Vector2 other)
public Vector2 translateBy(double x, double y)
public Vector2 rotateBy(Rotation2d r)
public boolean equals(java.lang.Object other)
public int hashCode()
public java.lang.String toString()
public java.lang.String toCSV()
public double getX()
public double getY()