sixty: Convert a decimal number to sexigesimal

Description Usage Arguments Details Value Author(s) Examples

Description

Convert a decimal number to sexigesimal

Usage

1
 sixty(scalar, trailsign = F)

Arguments

scalar

decimal quantity, scalar

trailsign

if =TRUE, then the function returns a negative sign to the first element, even if it is zero. If = FALSE, then the function returns a negative sign in the first nonzero element. (default = FALSE)

Details

Reverse of the function ten.

Value

result

real vector of three elements, sexigesimal equivalent of input decimal quantity

Author(s)

Written by R. S. Hill, STX, 1987

R adaptation by Arnab Chakraborty June 2013

Examples

1
2
3
sixty(136.127)
sixty(-0.345)  #  returns (0.0,-20.0,42.0)
sixty(-0.345, trailsign=TRUE)  #  returns (-0.0,20.0,42.0)

Example output

[1] 136.0   7.0  37.2
[1]   0 -20  42
[1]  0 20 42

astrolibR documentation built on May 2, 2019, 3:26 a.m.