year = ORIGINYEAR; /* = 1980 */which just seems like the most retarded piece of code ever. If it were me, I would have just used / and * or / and % even, but perhaps they were worried that that would be slower because it is maybe repeating some of the computation [I just tested this (I am bored -- everyone is sleeping but me), and the while -=, += method is over twice as slow as the /, * method]. So, way to go Microsoft.
while (days > 365)
{
if (IsLeapYear(year))
{
if (days > 366)
{
days -= 366;
year += 1;
}
}
else
{
days -= 365;
year += 1;
}
}
Thursday, January 1, 2009
some anti-microsoft humor
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment