Objectpi.VecFloat
public class VecFloat
A vector of three floats
Field Summary | |
---|---|
float |
x
|
float |
y
|
float |
z
|
static VecFloat |
ZERO
|
Method Summary | |
---|---|
VecFloat |
add(VecFloat v)
Add |
float |
dot(VecFloat v)
Scalar product |
float |
length()
Length |
float |
lengthSq()
length * length |
VecFloat |
mul(float s)
Multiply with a float (scale) |
VecFloat |
neg()
Negate (multiply with -1) |
VecFloat |
normalized()
Get a vector in the same direction but with length 1 |
VecFloat |
sub(VecFloat v)
Subtract |
String |
toString()
|
static VecFloat |
xyz(float x,
float y,
float z)
Create |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final VecFloat ZERO
public final float x
public final float y
public final float z
Method Detail |
---|
public static VecFloat xyz(float x, float y, float z)
public VecFloat add(VecFloat v)
public VecFloat sub(VecFloat v)
public VecFloat mul(float s)
public VecFloat neg()
public float dot(VecFloat v)
public VecFloat normalized()
public float length()
public float lengthSq()
public final String toString()
toString
in class Object