15 namespace JGEOMETRY2D {}
16 namespace JPP {
using namespace JGEOMETRY2D; }
18 namespace JGEOMETRY2D {
209 return JVector2D(point).sub(*this).getLengthSquared();
270 const double A = a.
getX() - b.
getX();
271 const double B = a.
getY() - b.
getY();
273 const double D = c.
getY() - b.
getY();
275 return (A*D - B*C) <= 0.0;
Data structure for vector in two dimensions.
void transform(double &__x, double &__y) const
Transform.
double getLengthSquared() const
Get length squared.
JVector2D(const double x, const double y)
Constructor.
Auxiliary base class for aritmetic operations of derived class types.
double getDot(const JVector2D &point) const
Get dot product.
JVector2D & mul(const double factor)
Scale vector.
JVector2D()
Default constructor.
double getDistanceSquared(const JVector2D &point) const
Get squared of distance to point.
JVector2D & transform(const JMatrix2D &T)
Transform.
double getDistance(const JVector2D &point) const
Get distance to point.
JTOOLS::JRange< double > JRangeX
Type definition of range along x-axis.
bool getCCW(const T &a, const T &b, const T &c)
Check sequence of three points in X-Y plane.
double getY() const
Get y position.
JVector2D & sub(const JVector2D &vector)
Subtract vector.
JVector2D & negate()
Negate vector.
bool equals(const JVector2D &vector) const
Check equality.
double getX() const
Get x position.
JVector2D & div(const double factor)
Scale vector.
JVector2D & add(const JVector2D &vector)
Add vector.
Auxiliary class to define a range between two values.
JTOOLS::JRange< double > JRangeY
Type definition of range along y-axis.
double getPerpDot(const JVector2D &point) const
Get perpendicular dot product.
Base class for data structures with artithmetic capabilities.
double getLength() const
Get length.