|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Point
A class representing a two-dimensional point.
Defined in point.js
Field Summary | |
Float |
x
x value of the Point |
Float |
y
y value of the Point |
Constructor Summary | |
Point(<Float> x, <Float> y)
|
Method Summary | |
Float
|
dist(<Point> p)
computes the distance between a Point p and this Point |
Object
|
dividedBy(<Float> c)
divides this Point by a scalar c |
Boolean
|
equals(<Point> p)
checks if the coordinates of this Point match the coordinates of a Point p |
Object
|
minus(<Point> p)
subtracts a Point p from this Point |
Object
|
plus(<Point> p)
adds this Point to a Point p |
Point
|
round(numOfDigits)
rounds the coordinates to numOfDigits digits |
Object
|
times(<Float> c)
multiplies this Point by a scalar c |
String
|
toString()
|
Field Detail |
Float x
Float y
Constructor Detail |
Point(<Float> x, <Float> y)
x
- x value of the Point
y
- y value of the Point
Method Detail |
Float dist(<Point> p)
p
- the distance between this Point and the Point p is computed.
Object dividedBy(<Float> c)
c
- divisor
Boolean equals(<Point> p)
p
-
Object minus(<Point> p)
p
-
Object plus(<Point> p)
p
-
Point round(numOfDigits)
numOfDigits
- the coordinate will be rounded to numOfDigits digits
Object times(<Float> c)
c
- factor
String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |