Two gigaseconds #147

Merged
JanX2 merged 30 commits from two-gigaseconds into master 2021-05-06 22:50:26 -04:00
Showing only changes of commit a3398a1f07 - Show all commits

View file

@ -29,14 +29,14 @@
return nil;
}
double floatValue = [object doubleValue];
NSTimeInterval timeInterval = [object doubleValue];
if (isnan(floatValue)) { return @"NaN"; }
if (isinf(floatValue)) { return @"Inf"; }
if (isnan(timeInterval)) { return @"NaN"; }
if (isinf(timeInterval)) { return @"Inf"; }
BOOL isNegative = signbit(floatValue);
BOOL isNegative = signbit(timeInterval);
int totalSeconds = (int)(isNegative ? -floatValue : floatValue);
int totalSeconds = (int)(isNegative ? -timeInterval : timeInterval);
int seconds = totalSeconds % 60;
int minutes = totalSeconds / 60;