|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.Int2
Int2 - a pair of integers - no other assumptions
Contains two ints.
The default value is 0, 0.
| Constructor Summary | |
Int2()
|
|
Int2(Int2 r)
copy constructor |
|
Int2(int x,
int y)
|
|
| Method Summary | |
void |
clear()
set to 0, 0 |
int |
dotProduct(Int2 r)
get dot product |
int |
elementAt(int elem)
get either value; counts from ZERO |
boolean |
equals(Int2 r)
|
Int2 |
getMidPoint(Int2 p)
point midway between 'this' and 'p' |
int |
getX()
get X value |
int |
getY()
get Y value |
Int2 |
multiplyBy(int f)
multiply a point by a scalar |
void |
negative()
multiply both components by -1; MODIFIES 'this' |
Int2 |
plus(Int2 r2)
add two points - vector sum; |
void |
setX(int xx)
|
void |
setY(int yy)
|
void |
sortAscending()
sorts x and y so that x <= y |
void |
sortDescending()
sorts x and y so that x >= y |
Int2 |
subtract(Int2 r2)
subtract two points - vector difference; |
void |
swap()
swaps the x and y values |
java.lang.String |
toString()
|
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Int2()
public Int2(int x,
int y)
public Int2(Int2 r)
| Method Detail |
public void swap()
public void sortAscending()
public void sortDescending()
public void clear()
public void setX(int xx)
public void setY(int yy)
public boolean equals(Int2 r)
public Int2 plus(Int2 r2)
public Int2 subtract(Int2 r2)
public void negative()
public Int2 multiplyBy(int f)
public int getX()
public int getY()
public int elementAt(int elem)
throws java.lang.ArrayIndexOutOfBoundsException
public Int2 getMidPoint(Int2 p)
public int dotProduct(Int2 r)
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||