It's just an algorithm I was busy with in the past, it's the code I wrote when I first started, so I shared it. :)