Package org.hipparchus.geometry
Interface Point<S extends Space,P extends Point<S,P>>
- Type Parameters:
S
- Type of the space.P
- Type of the points in space.
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
Vector<S,
V>
This interface represents a generic geometrical point.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Compute the distance between the instance and another point.getSpace()
Get the space to which the point belongs.boolean
isNaN()
Returns true if any coordinate of this point is NaN; false otherwisemoveTowards
(P other, double ratio) Move towards another point.
-
Method Details
-
getSpace
Space getSpace()Get the space to which the point belongs.- Returns:
- containing space
-
isNaN
boolean isNaN()Returns true if any coordinate of this point is NaN; false otherwise- Returns:
- true if any coordinate of this point is NaN; false otherwise
-
distance
Compute the distance between the instance and another point.- Parameters:
p
- second point- Returns:
- the distance between the instance and p
-
moveTowards
Move towards another point.Motion is linear (along space curvature) and based on a ratio where 0.0 stands for not moving at all, 0.5 stands for moving halfway towards other point, and 1.0 stands for moving fully to the other point.
- Parameters:
other
- other pointratio
- motion ratio,- Returns:
- moved point
- Since:
- 4.0
-