TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Leaping Years and Drawing Lines

10 pointsby muriithiabout 17 years ago

2 comments

xiriumabout 17 years ago
I certainly hadn't associated Bresenham's algorithm with leap year algorithms but it is a good explanation.
bayareaguyabout 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>