FACT++  1.0
int eraTf2d ( char  s,
int  ihour,
int  imin,
double  sec,
double *  days 
)

Definition at line 4 of file tf2d.c.

References ERFA_DAYSEC.

Referenced by palDtf2d(), and t_tf2d().

40 {
41 
42 /* Compute the interval. */
43  *days = ( s == '-' ? -1.0 : 1.0 ) *
44  ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
45  ( (double) abs(imin) ) ) +
46  fabs(sec) ) / ERFA_DAYSEC;
47 
48 /* Validate arguments and return status. */
49  if ( ihour < 0 || ihour > 23 ) return 1;
50  if ( imin < 0 || imin > 59 ) return 2;
51  if ( sec < 0.0 || sec >= 60.0 ) return 3;
52  return 0;
53 
54 }
#define ERFA_DAYSEC
Definition: erfam.h:75

+ Here is the caller graph for this function: