>  Docs Center  >  Libraries  >  ASTROLIB  >  SIXTY

SIXTY

SIXTY

Name


SIXTY()

Purpose


Converts a decimal number to sexagesimal.

Explanation


Reverse of the TEN() function.

Calling Sequence


X = SIXTY( SCALAR, [ /TrailSign ] )

Inputs


SCALAR -- Decimal quantity.

Outputs


Function value returned = real vector of three elements,
sexagesimal equivalent of input decimal quantity. Double
      precision if the input is double, otherwise floating point.
By default, a negative number is signified by making the first non-zero
element of the output vection negative, but this can be modified with
      the /TrailSign keyword.

Optional Input Keyword


      /TrailSign - By default, SIXTY() returns a negative sign in the first
        nonzero element. If /TrailSign is set, then SIXTY() will return
        always return a negative sign in the first element, even if it is
        zero

Procedure


Mostly involves checking arguments and setting the sign.

Example


If x = -0.345d then sixty(x) = [0.0, -20.0, 42.0]
                      and sixty(x,/trail) = [-0.0, 20.0, 42.0]

Modification History


Written by R. S. Hill, STX, 19-OCT-87
Output changed to single precision. RSH, STX, 1/26/88
Accept single element vector W. Landsman Sep. 1996
Converted to IDL V5.0 W. Landsman September 1997
      Added /TrailSign keyword, preserve data type
                B. Stecklum/ W. Landsman March 2006



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us