pulpcore.math
Class Tuple2i
java.lang.Object
pulpcore.math.Tuple2i
public class Tuple2i
- extends Object
An integer pair that can be used as a point, vector, dimension, complex, etc.
Field Summary |
int |
x
|
int |
y
|
Method Summary |
void |
add(int x,
int y)
|
void |
add(Tuple2i t)
|
long |
dot(Tuple2i t)
Interpreting this Tuple2i and the specified Tuple2i as a fixed-point vector,
return the dot product of the two vectors. |
boolean |
equals(Object o)
|
int |
hashCode()
|
long |
length()
Interpreting this Tuple2i as a fixed-point vector, return its length. |
void |
set(int x,
int y)
|
void |
sub(int x,
int y)
|
void |
sub(Tuple2i t)
|
x
public int x
y
public int y
Tuple2i
public Tuple2i()
Tuple2i
public Tuple2i(int x,
int y)
Tuple2i
public Tuple2i(Tuple2i t)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
set
public void set(int x,
int y)
add
public void add(int x,
int y)
sub
public void sub(int x,
int y)
add
public void add(Tuple2i t)
sub
public void sub(Tuple2i t)
length
public long length()
- Interpreting this Tuple2i as a fixed-point vector, return its length.
dot
public long dot(Tuple2i t)
- Interpreting this Tuple2i and the specified Tuple2i as a fixed-point vector,
return the dot product of the two vectors.
Copyright © 2007-2009 Interactive Pulp, LLC.