03.02.2018, 00:17
Quote:
Код:
splitsquares(Float:sizeX = 100.0, Float:sizeY = 100.0, num = 5) { new Float:offsetX = sizeX / num, Float:offsetY = sizeY / num; for(new x = 0; x < num; x ++) for(new y = 0; y < num; y ++) { new Float:minX = x * offsetX, Float:maxX = minX + sizeX; new Float:minY = y * offsetY, Float:maxY = minY + sizeY; // Do stuff with minX, maxX, minY, maxY... } } |
EDIT: I mean, I don't think that would work with a strict amount of squares.