Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Average start time handling midnightby QM (Parson) |
on Jul 22, 2016 at 10:50 UTC ( [id://1168342]=note: print w/replies, xml ) | Need Help?? |
Perhaps equivalent:
Convert the time to radians. Treat all times as unit vectors in polar coordinates, with the time_in_radians as the angle. Convert the polar (1, time_in_radians) to Cartesion (x,y). Sum all of the xs and ys separately, (optionally averaging them, again separately), and convert the result back to polar. The average time is the angle. The averaged magnitude might be interesting also. -QM
In Section
Seekers of Perl Wisdom
|
|