Basics
Guides
API Reference
Basics
Guides
API Reference
[14:7] extends: FxObj
Wraps JavaFX Point2D, an immutable 2D coordinate or vector with double precision X and Y components. Point2D is returned by the Node coordinate transform helpers (screenToLocal, localToScene, and friends) and is used throughout the 2D layout and geometry API for positions and vector math.
Point2D (X = null, Y = null)
Creates a new Point2D from X and Y, or wraps an existing Point2D AJO.
X is a double with the X coordinate, or a Point2D AJO to wrap.Y is a double with the Y coordinate.getX ()
Returns the X component of this point.
A double with the X value.getY ()
Returns the Y component of this point.
A double with the Y value.magnitude ()
Returns the magnitude (length) of this point treated as a vector.
A double with the magnitude.distance (object Other)
Returns the distance from this point to Other.
Other is a Point2D with the target point.A double with the distance.normalize ()
Returns a new normalized (unit length) Point2D in the same direction.
A new Point2D with unit length.add (object Other)
Returns a new Point2D that is the sum of this point and Other.
Other is a Point2D added to this point.A new Point2D with the sum.subtract (object Other)
Returns a new Point2D that is this point minus Other.
Other is a Point2D subtracted from this point.A new Point2D with the difference.midpoint (object Other)
Returns a new Point2D at the midpoint between this point and Other.
Other is a Point2D at the other end of the segment.A new Point2D at the midpoint.dotProduct (object Other)
Returns the dot product of this point and Other.
Other is a Point2D for the operand.A double with the dot product.angle (object Other)
Returns the angle in degrees between this vector and Other.
Other is a Point2D.A double with the angle in degrees.interpolate (object Other, double Frac)
Linearly interpolates between this point and Other by Frac. Frac 0.0 returns this point and 1.0 returns Other.
Other is a Point2D at the end of the interpolation.Frac is a double interpolation factor in the range 0.0 to 1.0.A new Point2D at the interpolated position.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.