Jump to content


Sascha88

Member Since 12 Aug 2011
Offline Last Active Jun 19 2012 12:08 PM

Posts I've Made

In Topic: Hot Ninja Moon Moon

01 September 2011 - 07:26 AM

This one is pretty boring, bad controls and too difficult. I dont really like it((((((

In Topic: Super Space Rogues

31 August 2011 - 01:01 PM

Congratulations))GameJolt's Rogue Competition does worth it!!

In Topic: Polkadot

30 August 2011 - 02:36 PM

I think it's quite easy and simple... just as it should be

In Topic: Checking if a number is a power of 2

24 August 2011 - 07:14 AM

There's a simple trick for this problem:

bool IsPowerOfTwo(ulong x)
{
return (x & (x - 1)) == 0;
}

Discovery of how and why this works is left as an exercise for the reader, as well as consideration of an obvious edge case. For completeness, zero is not a power of two. If you want to take into account that edge case, here's how:

bool IsPowerOfTwo(ulong x)
{
return (x != 0) && ((x & (x - 1)) == 0);
}

In Topic: Real-Time Mouse Gestures V' 2.1

17 August 2011 - 08:03 AM

Well,really good.. maybe the best thing i've found during the month!!