Package uk.ac.starlink.ttools.plot2.geom
Class SkyDistance
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SkyDistance
Encapsulates a distance on the sky and a label for its magnitude.
- Since:
- 21 Jan 2019
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this distance.double
Returns the distance in radians.static SkyDistance
getRoundDistance
(double rad) Returns a distance with a round value in the region of the supplied angle.toString()
-
Constructor Details
-
SkyDistance
Constructor.- Parameters:
radians
- distance in radianscaption
- annotation giving distance as a human-readable string
-
-
Method Details
-
getRadians
public double getRadians()Returns the distance in radians.- Returns:
- distance in radians
-
getCaption
Returns the description of this distance.- Returns:
- human-readable label indicating distance
-
toString
-
getRoundDistance
Returns a distance with a round value in the region of the supplied angle.- Parameters:
rad
- approximate distance in radians- Returns:
- SkyDistance instance with a round number caption
-