def gridSnap(point, grid=<NUM_LIT:1.0>):
def snapFunc(value):<EOL><INDENT>value += <NUM_LIT> <EOL>remainder = value%grid<EOL>value -= remainder<EOL>newAdd = round(remainder/grid)*grid<EOL>return value + newAdd<EOL><DEDENT>return MapPoint( snapFunc(point.x) ,<EOL>snapFunc(point.y) )<EOL>
cause the given point to snap to nearest X/Y grid point