• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualNet Gnome

Posted 01 August 2013 - 01:29 PM

i guess you could get crafty and make this work:

x+=vk==vkl?5:vk==vkr?-5:0;y+=vk==vku?-5:vk==vkd?5:0;


[realized i could compress it a bit more ;)]

if your compiler allows logical and-ing ints: you can shorten it to this:

x+=vk&vkl?-5:vk&vkr?5:0;y+=vk&vku?-5:vk&vkd?5:0;


### #7Net Gnome

Posted 01 August 2013 - 12:50 PM

i guess you could get crafty and make this work:

x+=vk==vkl?5:vk==vkr?-5:0;y+=vk==vku?-5:vk==vkd?5:0;


[realized i could compress it a bit more ;)]

### #6Net Gnome

Posted 01 August 2013 - 12:46 PM

i guess you could get crafty and make this work:

x += vk == vkl ? 5:vk == vkr ? -5:0;y += vk == vku ? -5:vk == vkd ? 5:0;


### #5Net Gnome

Posted 01 August 2013 - 12:45 PM

i guess you could get crafty and make this work:

x += vk == vkl ? 5 : vk == vkr ? -5 : 0; y += vk == vku ? -5 : vk == vkd ? 5 : 0;


### #4Net Gnome

Posted 01 August 2013 - 12:42 PM

i guess you could get crafty and make this work:

x = vk == vkl ? -5 : 5; y = vk == vku ? -5 : 5;


### #3Net Gnome

Posted 01 August 2013 - 12:42 PM

i guess you could get crafty and make this work:

x = vk == vkl ? 5 : -5; y = vk == vku ? -5 : 5;