mathematik
Class Vector2f
java.lang.Object
mathematik.Vector2f
- All Implemented Interfaces:
- java.io.Serializable, Vectorf
public class Vector2f
- extends java.lang.Object
- implements java.io.Serializable, Vectorf
- See Also:
- Serialized Form
|
Field Summary |
float |
x
|
float |
y
|
|
Method Summary |
void |
add(double theX,
double theY)
|
void |
add(float theX,
float theY)
|
void |
add(int theX,
int theY)
|
void |
add(Vector2f theVector)
|
void |
add(Vector2f theVectorA,
Vector2f theVectorB)
|
boolean |
almost(Vector2f theVector)
|
float |
angle(Vector2f theVector)
|
java.lang.Object |
clone()
|
Vector2f |
cloneVector()
|
void |
cross()
|
void |
cross(Vector2f theVector)
|
float |
direction()
|
float |
distance(Vector2f thePoint)
|
float |
distanceSquared(Vector2f thePoint)
|
float |
dot(Vector2f theVector)
|
boolean |
equals(Vector2f theVector)
|
boolean |
equalsZero()
Returns true if both x and y are zero |
boolean |
isNaN()
|
float |
length()
|
float |
lengthSquared()
|
void |
normalize()
|
void |
normalize(Vector2f theVector)
|
void |
rotate(float theRadians)
|
void |
scale(float theScalar)
|
void |
scale(float theXScalar,
float theYScalar)
|
void |
scale(float theScalar,
Vector2f theVector)
|
void |
scale(Vector2f theVector)
|
void |
set(double[] theVector)
|
void |
set(double theX,
double theY)
|
void |
set(float[] theVector)
|
void |
set(float theX,
float theY)
|
void |
set(int[] theVector)
|
void |
set(Vector2f theVector)
|
void |
sub(float theX,
float theY)
|
void |
sub(Vector2f theVector)
|
void |
sub(Vector2f theVectorA,
Vector2f theVectorB)
|
float[] |
toArray()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
public float x
y
public float y
Vector2f
public Vector2f()
Vector2f
public Vector2f(float theX,
float theY)
Vector2f
public Vector2f(double theX,
double theY)
Vector2f
public Vector2f(float[] theVector)
Vector2f
public Vector2f(double[] theVector)
Vector2f
public Vector2f(int[] theVector)
Vector2f
public Vector2f(Vector2f theVector)
Vector2f
public Vector2f(Vector3f theVector)
clone
public java.lang.Object clone()
- Overrides:
clone in class java.lang.Object
cloneVector
public Vector2f cloneVector()
set
public final void set(float theX,
float theY)
set
public final void set(double theX,
double theY)
set
public final void set(float[] theVector)
set
public final void set(double[] theVector)
set
public final void set(int[] theVector)
set
public final void set(Vector2f theVector)
add
public final void add(Vector2f theVectorA,
Vector2f theVectorB)
add
public void add(int theX,
int theY)
add
public void add(float theX,
float theY)
add
public void add(double theX,
double theY)
add
public final void add(Vector2f theVector)
sub
public final void sub(Vector2f theVectorA,
Vector2f theVectorB)
sub
public final void sub(Vector2f theVector)
sub
public final void sub(float theX,
float theY)
scale
public final void scale(float theScalar,
Vector2f theVector)
scale
public final void scale(float theScalar)
scale
public final void scale(Vector2f theVector)
scale
public final void scale(float theXScalar,
float theYScalar)
direction
public float direction()
dot
public final float dot(Vector2f theVector)
cross
public final void cross(Vector2f theVector)
cross
public final void cross()
length
public final float length()
lengthSquared
public final float lengthSquared()
normalize
public final void normalize(Vector2f theVector)
normalize
public final void normalize()
angle
public final float angle(Vector2f theVector)
rotate
public final void rotate(float theRadians)
distanceSquared
public final float distanceSquared(Vector2f thePoint)
distance
public final float distance(Vector2f thePoint)
toArray
public final float[] toArray()
isNaN
public final boolean isNaN()
equals
public final boolean equals(Vector2f theVector)
equalsZero
public boolean equalsZero()
- Returns true if both x and y are zero
- Returns:
- boolean, true if the vector is zero
almost
public final boolean almost(Vector2f theVector)
toString
public final java.lang.String toString()
- Overrides:
toString in class java.lang.Object
processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009