Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -615,7 +615,7 @@ public class LExecutor{
|
||||
toVar.isobj = value.isobj;
|
||||
}
|
||||
}else if(from instanceof CanvasBuild canvas && (exec.privileged || (from.team == exec.team))){
|
||||
canvas.setPixel(address, (int)(value.numval));
|
||||
canvas.setPixel(address, value.numi());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,11 +167,11 @@ public class CanvasBlock extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
public int getPixel(int pos){
|
||||
public double getPixel(int pos){
|
||||
if(pos >= 0 && pos < canvasSize * canvasSize){
|
||||
return getByte(data, pos * bitsPerPixel);
|
||||
}
|
||||
return 0;
|
||||
return Double.NaN;
|
||||
}
|
||||
|
||||
public int getPixel(int x, int y){
|
||||
|
||||
Reference in New Issue
Block a user