Package uk.ac.starlink.ttools.plot2.geom
Class SkyDistance
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.geom.SkyDistance
-
public class SkyDistance extends java.lang.Object
Encapsulates a distance on the sky and a label for its magnitude.- Since:
- 21 Jan 2019
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SkyDistance(double radians, java.lang.String caption)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCaption()
Returns the description of this distance.double
getRadians()
Returns the distance in radians.static SkyDistance
getRoundDistance(double rad)
Returns a distance with a round value in the region of the supplied angle.java.lang.String
toString()
-
-
-
Method Detail
-
getRadians
public double getRadians()
Returns the distance in radians.- Returns:
- distance in radians
-
getCaption
public java.lang.String getCaption()
Returns the description of this distance.- Returns:
- human-readable string indicating distance
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getRoundDistance
public static SkyDistance getRoundDistance(double rad)
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
-
-