|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectTuple.Tuple2f
public class Tuple2f
| Field Summary | |
|---|---|
float |
x
|
float |
y
|
| Constructor Summary | |
|---|---|
Tuple2f(float x,
float y)
Creates a new instance of Tuple2f |
|
Tuple2f(java.lang.String token)
Will parse the format used in the toString() method |
|
| Method Summary | |
|---|---|
float |
distanceSquared(Tuple2f other)
Finds the squared distance between two Tuples. |
void |
divideEquals(float a)
In place divide |
float |
dot(Tuple2f a)
Returns the dot product of two Tuples. |
float |
length()
|
Tuple2f |
minus(Tuple2f a)
Subtract two tuples and return the value in a new Tuple |
Tuple2f |
plus(Tuple2f a)
Add two tuples and return the value in a new Tuple |
Tuple2f |
times(float a)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public float x
public float y
| Constructor Detail |
|---|
public Tuple2f(float x,
float y)
x - y - public Tuple2f(java.lang.String token)
token - string in the format from the toString() method. Specifically, "x:y"| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic float distanceSquared(Tuple2f other)
other -
public float length()
public Tuple2f minus(Tuple2f a)
a - public Tuple2f plus(Tuple2f a)
a - public void divideEquals(float a)
a - divisorpublic float dot(Tuple2f a)
a - compare to this Tuple
public Tuple2f times(float a)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||