You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the validate_area() function, x1 is switched with x2 and y1 is switched with y2 depending on which is larger, but when drawing a line, this causes the direction of the line to change if x1/x2 are switched but y1/y2 are not, or vice versa.
For example, a line from (16,1) to (1,16) gets turned into (1,1) to (16,16), which is not the same line.
Example Luacontroller program (GPU on channel "gpu", digiscreen or 16x16 rgblightstone on channel "screen"):
If working properly it will draw a line from the top right to bottom left (/ shape - not perfect but I don't think it ever has been), if not the line will be from top left to bottom right (\ shape).
The text was updated successfully, but these errors were encountered:
OK, I hope this does it now. Have added an underflow check, figured it is more expressive and cleaner than a simple if buff[y] and buff[y][x] then which would require yet another indent for an edge case that can be solved without indents.
In the
validate_area()
function, x1 is switched with x2 and y1 is switched with y2 depending on which is larger, but when drawing a line, this causes the direction of the line to change if x1/x2 are switched but y1/y2 are not, or vice versa.For example, a line from (16,1) to (1,16) gets turned into (1,1) to (16,16), which is not the same line.
Example Luacontroller program (GPU on channel "gpu", digiscreen or 16x16 rgblightstone on channel "screen"):
If working properly it will draw a line from the top right to bottom left (
/
shape - not perfect but I don't think it ever has been), if not the line will be from top left to bottom right (\
shape).The text was updated successfully, but these errors were encountered: