Lines Matching refs:hour
188 void timelib_decimal_hour_to_hms(double h, int *hour, int *min, int *sec) in timelib_decimal_hour_to_hms() argument
198 *hour = floor(h); in timelib_decimal_hour_to_hms()
199 seconds = floor((h - *hour) * 3600); in timelib_decimal_hour_to_hms()
205 *hour = 0 - *hour; in timelib_decimal_hour_to_hms()
209 void timelib_hms_to_decimal_hour(int hour, int min, int sec, double *h) in timelib_hms_to_decimal_hour() argument
211 if (hour >= 0) { in timelib_hms_to_decimal_hour()
212 *h = ((double)hour + (double)min / 60 + (double)sec / 3600); in timelib_hms_to_decimal_hour()
214 *h = ((double)hour - (double)min / 60 - (double)sec / 3600); in timelib_hms_to_decimal_hour()
218 void timelib_hmsf_to_decimal_hour(int hour, int min, int sec, int us, double *h) in timelib_hmsf_to_decimal_hour() argument
220 if (hour >= 0) { in timelib_hmsf_to_decimal_hour()
221 …*h = ((double)hour + (double)min / MINS_PER_HOUR + (double)sec / SECS_PER_HOUR) + (double)us / USE… in timelib_hmsf_to_decimal_hour()
223 …*h = ((double)hour - (double)min / MINS_PER_HOUR - (double)sec / SECS_PER_HOUR) - (double)us / USE… in timelib_hmsf_to_decimal_hour()