Add Me!Close Menu Navigation

From fighting crime and arresting pirates to blasting away zombies, you can always count on a superhero. Unfortunately, I am definitely not that person.

Add Me!Open Categories Menu

Currently Browsing

C

28 October

0x5f400000: Understanding Fast Inverse Sqrt the Easy(ish) Way!

In this post, we attempt to unravel the mysteries of the “magic” constant found in the fast inverse sqrt method in an intuitive fashion.

6 August
Posted in Article, C

Somewhat Fast Square Root

Written for a challenge from /r/dailyprogrammer, I present to you an algorithm to approximate square roots that is still unfortunately slower than the _mm_sqrt_ps primitive offered by Intel. The following article is largely inspired by the brilliantly written Fast InvSqrt algorithm from id software.

17 February
Posted in Article, C, Lua

Polygonal Collision Detection

We will use the Separating Axis theorem to deduce whether two convex polygons are overlapping or not and implement the desired algorithm in both C and Lua. Collision detection is primarily used within the game development industry, but practical uses outside of this industry are also quite common.