|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.epfl.scapetoad.Geometry
public class Geometry
Contains some static methods for geometrical computations.
Constructor Summary | |
---|---|
Geometry()
|
Method Summary | |
---|---|
static double |
areaOfQuadrangle(double ax,
double ay,
double bx,
double by,
double cx,
double cy,
double dx,
double dy)
Computes the area of an irregular quadrangle defined by the points A(ax, ay), B(bx, by), C(cx, cy) and D(dx, dy). |
static double |
areaOfTriangle(double ax,
double ay,
double bx,
double by,
double cx,
double cy)
Computes the area of the triangle defined by the points A(ax, ay), B(bx, by) and C(cx, cy). |
static double[] |
intersectionOfSegments(double ax,
double ay,
double bx,
double by,
double cx,
double cy,
double dx,
double dy)
Computes the intersection of two segments AB and CD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Geometry()
Method Detail |
---|
public static double areaOfTriangle(double ax, double ay, double bx, double by, double cx, double cy)
ax
- the x coordinate of point Aay
- the y coordinate of point Abx
- the x coordinate of point Bby
- the y coordinate of point Bcx
- the x coordinate of point Ccy
- the y coordinate of point C
public static double areaOfQuadrangle(double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy)
ax
- the x coordinate of point Aay
- the y coordinate of point Abx
- the x coordinate of point Bby
- the y coordinate of point Bcx
- the x coordinate of point Ccy
- the y coordinate of point Cdx
- the x coordinate of point Ddy
- the y coordinate of point D
public static double[] intersectionOfSegments(double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |