def setup x = -3 y = abs(x) background(220) textSize(20) text(x, 40, 40) text(y, 40, 70) # 絶対値 end
[p5.js] abs
絶対値を計算します。
r : 絶対値