public class Vector2D
| Modifier and Type | Class and Description |
|---|---|
static class |
Vector2D.Companion |
| Modifier and Type | Field and Description |
|---|---|
static Vector2D.Companion |
Companion |
| Constructor and Description |
|---|
Vector2D(double x,
double y) |
| Modifier and Type | Method and Description |
|---|---|
Vector2D |
add(Vector2D other) |
double |
component1() |
double |
component2() |
Vector2D |
copy(double x,
double y) |
boolean |
equals(java.lang.Object p) |
double |
getX() |
double |
getY() |
int |
hashCode() |
Vector2D |
normalize() |
Vector2D |
rotate(int fromDirection,
int toDirection) |
Vector2D |
scale(double amountX,
double amountY) |
Vector2D |
scale(Vector2D vector) |
java.lang.String |
toString() |
Vector2D |
trimMax(double xMax,
double yMax) |
Vector2D |
trimMin(double xMin,
double yMin) |
Vector2D |
withX(double value) |
Vector2D |
withY(double value) |
public static Vector2D.Companion Companion
@NotNull public Vector2D normalize()
@NotNull public Vector2D rotate(int fromDirection, int toDirection)
@NotNull public Vector2D scale(double amountX, double amountY)
@NotNull public Vector2D trimMax(double xMax, double yMax)
@NotNull public Vector2D trimMin(double xMin, double yMin)
@NotNull public Vector2D withX(double value)
@NotNull public Vector2D withY(double value)
public double getX()
public double getY()
public double component1()
public double component2()
@NotNull public Vector2D copy(double x, double y)
@NotNull public java.lang.String toString()
public int hashCode()
public boolean equals(@Nullable
java.lang.Object p)