|
Webnote | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Point
A class representing two numbers, x and y.
Defined in objects.js
Field Summary | |
int |
x
|
int |
y
|
Constructor Summary | |
Point
(<int> x, <int> y)
Create a new Point object |
Method Summary | |
Point
|
add(<Point> rhs)
Add two points together and return a new Point object. |
Point
|
copy()
Make a copy of the Point object. |
Point
|
div(<int> n)
Divide x and y by the input value. |
boolean
|
equals(<Point> rhs)
Determines if two points have the samve x and y values, respectively. |
Point
|
sub(<Point> rhs)
Subtract the input point from the object and return a new Point object. |
String
|
toString()
A string representation of a point. |
Field Detail |
int x
int y
Constructor Detail |
Point(<int> x, <int> y)
x
- optional parameter for x
y
- optional parameter for y
Method Detail |
Point add(<Point> rhs)
rhs
- The point object to add.
Point copy()
Point div(<int> n)
n
- a number to divide by
boolean equals(<Point> rhs)
rhs
- the point to compare
Point sub(<Point> rhs)
rhs
- The point to subtract.
String toString()
|
Webnote | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |