/* 6.914, Example 2.0 Useful mathematical operators in Processing: pow(x, y) x^y sq(x) x^2 sqrt(x) x^.5 x%y remainder(x/y)* sin(x) sin(x) cos(x) cos(x) dist(x1, y1, x2, y2) sqrt((x2-x1)^2+(y2-y1)^2) * Use a%b ("a modulo b") to get the remainder when a is divided by b. If a is evenly divisible by b, the modulus of the operation will be zero. */ void setup(){ noLoop(); } void draw(){ println("3 to the 5th power is "+int(pow(3, 5))); println("3 squared is "+int(sq(3))); println("The square root of 3 is "+sqrt(3)); println("3 mod 5 is "+(3%5)); println("The distance between (3, 5) and (5, 3) is "+(dist(3, 5, 5, 3))); }