def coordsToTileEdges(ix, iy, ts):
	"""
	Return the ix and iy snapped to the nearest division between tiles
	This is used for physics drawing
	@type ix: int
	@param ix: x-coordinate of mouse
	@type iy: int
	@param iy: y-coordinate of mouse
	@type ts: int
	@param ts: the size (in pixels) of a tile
	"""
	x = round(ix / ts) * ts
	y = round(iy / ts) * ts
	return x, y