Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 16th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CGPoint destination = ccp((int)(([self position].x + ((dt.x > 0 && dt.x < sizeBlock) ? 0 : dt.x) * 2) / sizeBlock) * sizeBlock,
  2.                                 (int)(([self position].y + ((dt.y > 0 && dt.y < sizeBlock) ? 0 : dt.y) * 2) / sizeBlock) * sizeBlock);