|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gnu.gleem.linalg.Vec2f
2-element single-precision vector
| Constructor Summary | |
Vec2f()
|
|
Vec2f(float x,
float y)
|
|
Vec2f(Vec2f arg)
|
|
| Method Summary | |
void |
add(Vec2f b)
this = this + b |
void |
add(Vec2f a,
Vec2f b)
this = a + b |
Vec2f |
addScaled(float s,
Vec2f arg)
Returns this + s * arg; creates new vector |
void |
addScaled(Vec2f a,
float s,
Vec2f b)
this = a + s * b |
Vec2f |
copy()
|
float |
dot(Vec2f arg)
|
float |
get(int i)
Gets the ith component, 0 <= i < 2 |
float |
length()
|
float |
lengthSquared()
|
Vec2f |
minus(Vec2f arg)
Returns this - arg; creates new vector |
void |
normalize()
|
Vec2f |
plus(Vec2f arg)
Returns this + arg; creates new vector |
void |
scale(float val)
this = this * val |
void |
set(float x,
float y)
|
void |
set(int i,
float val)
Sets the ith component, 0 <= i < 2 |
void |
setX(float x)
|
void |
setY(float y)
|
void |
sub(Vec2f b)
this = this - b |
void |
sub(Vec2f a,
Vec2f b)
this = a - b |
Vec2f |
times(float val)
Returns this * val; creates new vector |
java.lang.String |
toString()
|
Vecf |
toVecf()
|
float |
x()
|
float |
y()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Vec2f()
public Vec2f(Vec2f arg)
public Vec2f(float x,
float y)
| Method Detail |
public Vec2f copy()
public void set(float x,
float y)
public void set(int i,
float val)
public float get(int i)
public float x()
public float y()
public void setX(float x)
public void setY(float y)
public float dot(Vec2f arg)
public float length()
public float lengthSquared()
public void normalize()
public Vec2f times(float val)
public void scale(float val)
public Vec2f plus(Vec2f arg)
public void add(Vec2f b)
public void add(Vec2f a,
Vec2f b)
public Vec2f addScaled(float s,
Vec2f arg)
public void addScaled(Vec2f a,
float s,
Vec2f b)
public Vec2f minus(Vec2f arg)
public void sub(Vec2f b)
public void sub(Vec2f a,
Vec2f b)
public Vecf toVecf()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||