public class V3 extends Tuple3f
Constructor and Description |
---|
V3() |
Modifier and Type | Method and Description |
---|---|
float |
angle(V3 v1)
Returns the angle in radians between this vector and the vector parameter;
the return value is constrained to the range [0,PI].
|
void |
cross(V3 v1,
V3 v2)
Sets this vector to be the vector cross product of vectors v1 and v2.
|
float |
dot(V3 v)
Computes the dot product of the this vector and vector v.
|
float |
length()
Returns the length of this vector.
|
float |
lengthSquared()
Returns the squared length of this vector.
|
static V3 |
new3(float x,
float y,
float z) |
static V3 |
newV(Tuple3f t) |
static V3 |
newVsub(Tuple3f t1,
Tuple3f t2) |
void |
normalize()
Normalizes this vector in place.
|
public static V3 new3(float x, float y, float z)
public final float lengthSquared()
public final float length()
public final void cross(V3 v1, V3 v2)
v1
- the first vectorv2
- the second vectorpublic final float dot(V3 v)
v
- the other vectorpublic final void normalize()
public final float angle(V3 v1)
v1
- the other vector