|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.sketch.uml.S_UMLPoint
This class is a collection of static methods that are commonly used when doing point computations. The S in front of the class name implies that all methods are static.
| Constructor Summary | |
S_UMLPoint()
|
|
| Method Summary | |
static boolean |
close(Point start,
Point end)
Returns true if within default distance 10 |
static boolean |
close(Point start,
Point end,
double d)
Returns true if within distance d |
static double |
distance(double x1,
double y1,
double x2,
double y2)
Returns the distance between two points |
static double |
distance(int x1,
int y1,
int x2,
int y2)
Returns the distance between two points |
static double |
distance(Point p1,
Point p2)
Returns the distance between two points |
static Point |
rotatePoint(Point p,
double angle)
Returns the point rotated by an angle |
static Point |
shiftPoint(Point p,
int shift_x,
int shift_y)
Returns the point horizontally by shift_x and vertically by shift_y |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public S_UMLPoint()
| Method Detail |
public static double distance(double x1,
double y1,
double x2,
double y2)
public static double distance(Point p1,
Point p2)
public static double distance(int x1,
int y1,
int x2,
int y2)
public static Point rotatePoint(Point p,
double angle)
public static Point shiftPoint(Point p,
int shift_x,
int shift_y)
public static boolean close(Point start,
Point end)
public static boolean close(Point start,
Point end,
double d)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||