@Deprecated public class Vector2D extends Object
NOTE: This API is still in flux and might change in incompatible ways in the next release.
Constructor and Description |
---|
Vector2D()
Deprecated.
|
Vector2D(double x,
double y)
Deprecated.
Create a vector from the origin of the coordinate system to the given
point
|
Vector2D(Point2D p)
Deprecated.
Create a vector from the origin of the coordinate system to the given
point
|
Vector2D(Point2D from,
Point2D to)
Deprecated.
Create a vector from one point to another
|
Vector2D(Vector2D other)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
double |
dot(Vector2D in)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
boolean |
equals(Vector2D other)
Deprecated.
|
double |
getX()
Deprecated.
|
double |
getY()
Deprecated.
|
int |
hashCode()
Deprecated.
|
Vector2D |
mult(double d)
Deprecated.
|
double |
norm()
Deprecated.
|
double |
normSqr()
Deprecated.
Vector length (magnitude) squared
|
void |
set(double x,
double y)
Deprecated.
|
void |
setX(double x)
Deprecated.
|
void |
setY(double y)
Deprecated.
|
public Vector2D(double x, double y)
x
- y
- public Vector2D(Point2D p)
public Vector2D(Point2D from, Point2D to)
from
- to
- public Vector2D()
public Vector2D(Vector2D other)
public double getX()
public double getY()
public void setX(double x)
public void setY(double y)
public void set(double x, double y)
public boolean equals(Vector2D other)
public double dot(Vector2D in)
public double normSqr()
public double norm()
public Vector2D mult(double d)