I was going to see if I could do grid movement without the standard grid that Game Maker has, but I have questions. The method I was using involves modulus on both the x and y variables of the moving object; this is because modulus returns the remainder and if I have a 16 x 16 grid layout, taking both the x and y modulo 16 returning 0 will mean that the moving object is in fact on the grid:
if (!(x mod 16 = 0 && y mod 16 = 0))
{
...
}
or this:
if (x mod 16 != 0 || y mod 16 != 0)
{
...
}
My question is in relation to De Morgan logic. Even though both statements are the same in what they return, which is more efficient to use, or is it just a stylistic choice? My guess would be that the or is quicker because it only has to check one, but I am unsure.