| Constructor and Description |
|---|
AbstractVector() |
| Modifier and Type | Method and Description |
|---|---|
Vector |
add(float x,
float y)
Adds a vector to this one.
|
Vector |
add(float x,
float y,
Vector result)
Adds a vector to this one and stores the result in the object provided.
|
Vector |
add(IVector other)
Adds a vector to this one.
|
Vector |
add(IVector other,
Vector result)
Adds a vector to this one, storing the result in the object provided.
|
Vector |
addScaled(IVector other,
float v)
Adds a scaled vector to this one.
|
Vector |
addScaled(IVector other,
float v,
Vector result)
Adds a scaled vector to this one and stores the result in the supplied vector.
|
float |
angle()
Returns the angle of this vector.
|
float |
angleBetween(IVector other)
Returns the angle between this vector and the specified other vector.
|
Vector |
clone()
Returns a mutable copy of this vector.
|
Vector |
cross(IVector other)
Computes the cross product of this and the specified other vector.
|
Vector |
cross(IVector other,
Vector result)
Computes the cross product of this and the specified other vector, placing the result in
the object supplied.
|
float |
distance(IVector other)
Returns the distance from this vector to the specified other vector.
|
float |
distanceSq(IVector other)
Returns the squared distance from this vector to the specified other.
|
float |
dot(IVector other)
Computes and returns the dot product of this and the specified other vector.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isZero()
Returns true if this vector has zero magnitude.
|
float |
length()
Returns the length (magnitude) of this vector.
|
float |
lengthSq()
Returns the squared length of this vector.
|
Vector |
lerp(IVector other,
float t)
Linearly interpolates between this and the specified other vector by the supplied amount.
|
Vector |
lerp(IVector other,
float t,
Vector result)
Linearly interpolates between this and the supplied other vector by the supplied amount,
storing the result in the supplied object.
|
Vector |
negate()
Negates this vector.
|
Vector |
negate(Vector result)
Negates this vector, storing the result in the supplied object.
|
Vector |
normalize()
Normalizes this vector.
|
Vector |
normalize(Vector result)
Normalizes this vector, storing the result in the object supplied.
|
Vector |
rotate(float angle)
Rotates this vector by the specified angle.
|
Vector |
rotate(float angle,
Vector result)
Rotates this vector by the specified angle, storing the result in the vector provided.
|
Vector |
rotateAndAdd(float angle,
IVector add,
Vector result)
Rotates this vector by the specified angle and adds another vector to it, placing the
result in the object provided.
|
Vector |
rotateScaleAndAdd(float angle,
float scale,
IVector add,
Vector result)
Rotates this vector by the specified angle, applies a uniform scale, and adds another
vector to it, placing the result in the object provided.
|
Vector |
scale(float v)
Scales this vector uniformly by the specified magnitude.
|
Vector |
scale(float v,
Vector result)
Scales this vector uniformly by the specified magnitude, and places the result in the
supplied object.
|
Vector |
scale(IVector other)
Scales this vector's x and y components independently by the x and y components of the
supplied vector.
|
Vector |
scale(IVector other,
Vector result)
Scales this vector's x and y components independently by the x and y components of the
supplied vector, and stores the result in the object provided.
|
Vector |
subtract(float x,
float y)
Subtracts a vector from this one.
|
Vector |
subtract(float x,
float y,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
Vector |
subtract(IVector other)
Subtracts a vector from this one.
|
Vector |
subtract(IVector other,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
String |
toString() |
public float dot(IVector other)
IVectorpublic Vector cross(IVector other)
IVectorpublic Vector cross(IVector other, Vector result)
IVectorpublic Vector negate(Vector result)
IVectorpublic Vector normalize()
IVectorpublic Vector normalize(Vector result)
IVectorpublic float length()
IVectorpublic float lengthSq()
IVectorpublic boolean isZero()
IVectorpublic float distance(IVector other)
IVectorpublic float distanceSq(IVector other)
IVectordistanceSq in interface IVectorpublic float angle()
IVectorpublic float angleBetween(IVector other)
IVectorangleBetween in interface IVectorpublic Vector scale(float v)
IVectorpublic Vector scale(float v, Vector result)
IVectorpublic Vector scale(IVector other)
IVectorpublic Vector scale(IVector other, Vector result)
IVectorpublic Vector add(IVector other)
IVectorpublic Vector add(IVector other, Vector result)
IVectorpublic Vector subtract(IVector other)
IVectorpublic Vector subtract(IVector other, Vector result)
IVectorpublic Vector add(float x, float y)
IVectorpublic Vector add(float x, float y, Vector result)
IVectorpublic Vector subtract(float x, float y)
IVectorpublic Vector subtract(float x, float y, Vector result)
IVectorpublic Vector addScaled(IVector other, float v)
IVectorpublic Vector addScaled(IVector other, float v, Vector result)
IVectorpublic Vector rotate(float angle)
IVectorpublic Vector rotate(float angle, Vector result)
IVectorpublic Vector rotateAndAdd(float angle, IVector add, Vector result)
IVectorrotateAndAdd in interface IVectorpublic Vector rotateScaleAndAdd(float angle, float scale, IVector add, Vector result)
IVectorrotateScaleAndAdd in interface IVectorpublic Vector lerp(IVector other, float t)
IVectorpublic Vector lerp(IVector other, float t, Vector result)
IVectorpublic Vector clone()
IVectorCopyright © 2017. All rights reserved.