java.lang.Object
eu.hansolo.toolboxfx.geom.Point
- All Implemented Interfaces:
Comparable<Point>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double x, double y) doubleangle(double x, double y) doubledoubledoubleangleBetween(double x, double y) doubleclone()intdoublecrossProductLength(double x, double y) doublecrossProductLength(Point point) static doublecrossProductLength(Point p1, Point p2) doubledoubledistanceTo(double x, double y) doubledistanceTo(Point p) doubledotProductLength(double x, double y) doubledotProductLength(Point point) static doubledotProductLength(Point p1, Point p2) booleandoubleeuclideanDistanceTo(double x, double y) doublefromPolar(double length, double angleRad) doublegetX()intdoublegetY()intinthashCode()booleanisColinearTo(Point point) booleanisEmpty()doublelength()doubledoublemidpoint(double x, double y) multiply(double factor) static Pointstatic PointnearestWithinRadius(Point point, List<Point> points, double radius) voidscaleBy(double sx, double sy) voidset(double[] xy) voidset(double x, double y) voidvoidsetEmpty(boolean isEmpty) voidsetX(double x) voidsetY(double y) subtract(double x, double y) toString()voidtranslateBy(double dx, double dy)
-
Field Details
-
x
public double x -
y
public double y
-
-
Constructor Details
-
Point
public Point() -
Point
-
Point
public Point(double x, double y) -
Point
public Point(double x, double y, boolean empty)
-
-
Method Details
-
getX
public double getX() -
setX
public void setX(double x) -
getXAsInt
public int getXAsInt() -
getY
public double getY() -
setY
public void setY(double y) -
getYAsInt
public int getYAsInt() -
set
public void set(double[] xy) -
set
-
set
public void set(double x, double y) -
isEmpty
public boolean isEmpty() -
setEmpty
public void setEmpty(boolean isEmpty) -
translateBy
public void translateBy(double dx, double dy) -
scaleBy
public void scaleBy(double sx, double sy) -
euclideanDistanceTo
-
euclideanDistanceTo
public double euclideanDistanceTo(double x, double y) -
distanceTo
-
distanceTo
public double distanceTo(double x, double y) -
distanceSquareTo
-
fromPolar
-
add
-
add
-
subtract
-
subtract
-
multiply
-
normalize
-
midpoint
-
midpoint
-
angle
-
angle
public double angle(double x, double y) -
angle
-
angleBetween
-
angleBetween
public double angleBetween(double x, double y) -
isColinearTo
-
magnitude
public double magnitude() -
length
public double length() -
lengthSquared
public double lengthSquared() -
dotProductLength
-
dotProductLength
public double dotProductLength(double x, double y) -
crossProductLength
-
crossProductLength
public double crossProductLength(double x, double y) -
nearestWithinRadius
-
nearest
-
dotProductLength
-
crossProductLength
-
clone
-
compareTo
- Specified by:
compareToin interfaceComparable<Point>
-
hashCode
public int hashCode() -
equals
-
toString
-