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
191 *hour = floor(h); in timelib_decimal_hour_to_hms()
192 *min = floor((h - *hour) * 60); in timelib_decimal_hour_to_hms()
193 *sec = (h - *hour - ((float) *min / 60)) * 3600; in timelib_decimal_hour_to_hms()
195 *hour = ceil(h); in timelib_decimal_hour_to_hms()
196 *min = 0 - ceil((h - *hour) * 60); in timelib_decimal_hour_to_hms()
197 *sec = 0 - (h - *hour - ((float) *min / -60)) * 3600; in timelib_decimal_hour_to_hms()
201 void timelib_hms_to_decimal_hour(int hour, int min, int sec, double *h) in timelib_hms_to_decimal_hour() argument
203 if (hour >= 0) { in timelib_hms_to_decimal_hour()
204 *h = ((double)hour + (double)min / 60 + (double)sec / 3600); in timelib_hms_to_decimal_hour()
206 *h = ((double)hour - (double)min / 60 - (double)sec / 3600); in timelib_hms_to_decimal_hour()
210 void timelib_hmsf_to_decimal_hour(int hour, int min, int sec, int us, double *h) in timelib_hmsf_to_decimal_hour() argument
212 if (hour >= 0) { in timelib_hmsf_to_decimal_hour()
213 …*h = ((double)hour + (double)min / MINS_PER_HOUR + (double)sec / SECS_PER_HOUR) + (double)us / USE… in timelib_hmsf_to_decimal_hour()
215 …*h = ((double)hour - (double)min / MINS_PER_HOUR - (double)sec / SECS_PER_HOUR) - (double)us / USE… in timelib_hmsf_to_decimal_hour()