Class 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SkyDistance

        public SkyDistance​(double radians,
                           java.lang.String caption)
        Constructor.
        Parameters:
        radians - distance in radians
        caption - annotation giving distance as a human-readable string
    • 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 class java.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