Package com.j3d.engine.math
Class BasePoint<T extends Number>
java.lang.Object
com.j3d.engine.math.BasePoint<T>
- Type Parameters:
T- The type of the given point, which can either be anIntegerorDoubleor any other thing that extendsNumber
- Direct Known Subclasses:
CartesianPoint,ScreenPoint
Base Point is a generic 2D point base class
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareCollinear(CartesianPoint p1, CartesianPoint p2, CartesianPoint p3) A static class that checks if 3CartesianPoints lie on the same line (Are collinear)
-
Field Details
-
x
Tge X-Value -
y
The Y-Value
-
-
Constructor Details
-
BasePoint
Default Constructor Initializing the point.- Parameters:
xcord- The x-coordinate.ycord- The y-coordinate
-
-
Method Details
-
areCollinear
A static class that checks if 3CartesianPoints lie on the same line (Are collinear)- Parameters:
p1- Point 1p2- Point 2p3- Poit 3- Returns:
- A boolean value indicating whether the points are collinear or not.
-