abs(x)
絶対値を計算し返します。
xが0以上のときは、xをそのまま返し、xが0より小さいときは、-xを返します。
●Example from Arduino Web Site
[c]
abs(a++); // avoid this – yields incorrect results
abs(a);
a++; // use this instead – keep other math outside the function
[/c]
abs(x)
絶対値を計算し返します。
xが0以上のときは、xをそのまま返し、xが0より小さいときは、-xを返します。
●Example from Arduino Web Site
[c]
abs(a++); // avoid this – yields incorrect results
abs(a);
a++; // use this instead – keep other math outside the function
[/c]