• Shawn Hargreaves Blog

    Shawn is a twit

    • 6 Comments
    For a guy who spends his life working with, thinking about, and talking about technology, I'm actually a bit of a luddite. Can you believe I didn't own a cellphone until 2006? My friends make fun of me because my car has no AC, and you have to physically...
  • Shawn Hargreaves Blog

    Angles, integers, and modulo arithmetic

    • 14 Comments
    These days most people represent angles using degrees or radians, but many old-skool game programmers preferred a binary integer format where a full circle is 65536. To convert: short ToBinary( float degrees) { return ( short )(degrees * 65536 / 360...
Page 1 of 1 (2 items)