TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Leaping Years and Drawing Lines
10 points
by
muriithi
about 17 years ago
2 comments
xirium
about 17 years ago
I certainly hadn't associated Bresenham's algorithm with leap year algorithms but it is a good explanation.
bayareaguy
about 17 years ago
For the gcd, I've always liked this version from python's own unit test:<p><pre><code> def gcd(a, b): while a: a, b = b%a, a return b</code></pre>