xxxxxxxxxx
18
function setup() {
createCanvas(400, 400);
stroke(255,255,0);
background(0,0,0);
strokeWeight(5);
console.log("dD "+nf(displayDensity(),1,1)+" pD "+pixelDensity());
x = 50, y =50;
xincrement = 0.4;//change to any decimal to your liking and watch the dot move in different angles
yincrement = 1.6;//change to any decimal to your liking and watch the dot move in different angles
}
function draw() {
background(0,0,0);
x = x + xincrement;
y = y + yincrement;
console.log("x: " + x + " y: " + y); //values are decimals
point(x,y); //x and y aren't rounded (the dot moves according to the decimals)
}