|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.spatial.geometry.shape.Vector2D
public class Vector2D
2D vector
NOTE: This API is still in flux and might change in incompatible ways in the next release.
Constructor Summary | |
---|---|
Vector2D()
|
|
Vector2D(double x,
double y)
Create a vector from the origin of the coordinate system to the given point |
|
Vector2D(Point2D p)
Create a vector from the origin of the coordinate system to the given point |
|
Vector2D(Point2D from,
Point2D to)
Create a vector from one point to another |
|
Vector2D(Vector2D other)
|
Method Summary | |
---|---|
double |
dot(Vector2D in)
|
boolean |
equals(Object obj)
|
boolean |
equals(Vector2D other)
|
double |
getX()
|
double |
getY()
|
int |
hashCode()
|
Vector2D |
mult(double d)
|
double |
norm()
|
double |
normSqr()
Vector length (magnitude) squared |
void |
set(double x,
double y)
|
void |
setX(double x)
|
void |
setY(double y)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
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)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |