Uses of Class
org.apache.commons.geometry.euclidean.twod.Vector2D.Unit
Packages that use Vector2D.Unit
Package
Description
This package provides basic 2D geometry components.
-
Uses of Vector2D.Unit in org.apache.commons.geometry.euclidean.twod
Fields in org.apache.commons.geometry.euclidean.twod declared as Vector2D.UnitModifier and TypeFieldDescriptionprivate final Vector2D.Unit
Line.direction
The direction of the line as a normalized vector.static final Vector2D.Unit
Vector2D.Unit.MINUS_X
Negation of unit vector (coordinates: -1, 0).static final Vector2D.Unit
Vector2D.Unit.MINUS_Y
Negation of unit vector (coordinates: 0, -1).static final Vector2D.Unit
Vector2D.Unit.PLUS_X
Unit vector (coordinates: 1, 0).static final Vector2D.Unit
Vector2D.Unit.PLUS_Y
Unit vector (coordinates: 0, 1).Methods in org.apache.commons.geometry.euclidean.twod that return Vector2D.UnitModifier and TypeMethodDescriptionAffineTransformMatrix2D.applyDirection
(Vector2D vec) Apply this transform to the given vector, ignoring translations and normalizing the result.Vector2D.directionTo
(Vector2D v) Return the unit vector representing the direction of displacement from this vector to the given vector.static Vector2D.Unit
Vector2D.Unit.from
(double x, double y) Create a normalized vector.static Vector2D.Unit
Create a normalized vector.Line.getDirection()
Get the direction of the line.Vector2D.Unit.negate()
Get the negation of the instance.Vector2D.normalize()
Get a normalized vector aligned with the instance.Vector2D.Unit.normalize()
Get a normalized vector aligned with the instance.Vector2D.normalizeOrNull()
Attempt to compute a normalized vector aligned with the instance, returning null if such a vector cannot be computed.Vector2D.Unit.normalizeOrNull()
Attempt to compute a normalized vector aligned with the instance, returning null if such a vector cannot be computed.Vector2D.orthogonal()
Get a unit vector orthogonal to the instance.Vector2D.orthogonal
(Vector2D dir) Get a unit vector orthogonal to the current vector and pointing in the direction ofdir
.Vector2D.Unit.orthogonal()
Get a unit vector orthogonal to the instance.private static Vector2D.Unit
Vector2D.Unit.tryCreateNormalized
(double x, double y, boolean throwOnFailure) Attempt to create a normalized vector from the given coordinate values.Constructors in org.apache.commons.geometry.euclidean.twod with parameters of type Vector2D.UnitModifierConstructorDescription(package private)
Line
(Vector2D.Unit direction, double originOffset, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision) Simple constructor.