javax.vecmath
public class Vector2d extends Tuple2d implements Serializable
Constructor Summary | |
---|---|
Vector2d(double x, double y)
Constructs and initializes a Vector2d from the specified xy coordinates. | |
Vector2d(double[] v)
Constructs and initializes a Vector2d from the specified array. | |
Vector2d(Vector2d v1)
Constructs and initializes a Vector2d from the specified Vector2d. | |
Vector2d(Vector2f v1)
Constructs and initializes a Vector2d from the specified Vector2f. | |
Vector2d(Tuple2d t1)
Constructs and initializes a Vector2d from the specified Tuple2d. | |
Vector2d(Tuple2f t1)
Constructs and initializes a Vector2d from the specified Tuple2f. | |
Vector2d()
Constructs and initializes a Vector2d to (0,0). |
Method Summary | |
---|---|
double | angle(Vector2d v1)
Returns the angle in radians between this vector and
the vector parameter; the return value is constrained to the
range [0,PI]. |
double | dot(Vector2d v1)
Computes the dot product of the this vector and vector v1. |
double | length()
Returns the length of this vector. |
double | lengthSquared()
Returns the squared length of this vector. |
void | normalize()
Normalizes this vector in place. |
void | normalize(Vector2d v1)
Sets the value of this vector to the normalization of vector v1. |
Parameters: x the x coordinate y the y coordinate
Parameters: v the array of length 2 containing xy in order
Parameters: v1 the Vector2d containing the initialization x y data
Parameters: v1 the Vector2f containing the initialization x y data
Parameters: t1 the Tuple2d containing the initialization x y data
Parameters: t1 the Tuple2f containing the initialization x y data
Parameters: v1 the other vector
Returns: the angle in radians in the range [0,PI]
Parameters: v1 the other vector
Returns: the length of this vector
Returns: the squared length of this vector
Parameters: v1 the un-normalized vector