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>
public interface Point<S extends Space,P extends Point<S,P>> extends Serializable
This interface represents a generic geometrical point.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
distance(P p)
Compute the distance between the instance and another point.Space
getSpace()
Get the space to which the point belongs.boolean
isNaN()
Returns true if any coordinate of this point is NaN; false otherwiseP
moveTowards(P other, double ratio)
Move towards another point.
-
-
-
Method Detail
-
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
double distance(P p)
Compute the distance between the instance and another point.- Parameters:
p
- second point- Returns:
- the distance between the instance and p
-
moveTowards
P moveTowards(P other, double ratio)
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
-
-