Math (Printable)
Symbols [Observer, Turtle]
number1 +, -, *, / number2
Basic math functions. Be sure to put a space between the numbers and the symbol.
number1 ^ number2
Power function. Number1 ^ Number2 is equal to Number1 to the power of Number2
Symbols [Observer, Turtle]
number1 =, !=, <, >, <=, >= number2
Equivalency operators. Again, a space is needed between the numbers and the symbol.
abs number [Observer, Turtle]
Reports the absolute value of number.
acos number [Observer, Turtle]
Trigonometric function. Returns the arccosine of the specified number. All angles returned are in degrees.
condition1 and condition2 [Observer,
Turtle]
Reports true if condition1 and condition2 report
true.
asin
number [Observer, Turtle]
Trigonometric function. Returns
the arcsine of the specifiednumber. All angles returned are in degrees.
atan numerator denominator [Observer, Turtle]
Trigonometry function. Returns the arctangent of the specified angle numerator/denominator.
All angles are in degrees
condition1 bitand condition2 [Observer,
Turtle]
Reports the value of bitwise and on the inputs.
bitnot condition1 [Observer, Turtle]
Reports the bitwise negation of its input.
condition1 bitor condition2 [Observer,
Turtle]
Reports the value of bitwise or on the inputs.
input1 bitxor input2 [Observer, Turtle]
Reports the value of bitwise xor on the inputs.
cos number [Observer, Turtle]
Trigonometry function. Returns the cosine of the specified angle. All angles are in degrees.
number1 div number2 [Observer, Turtle]
Returns the integer part of the answer to number1 / number2.
e [Observer, Turtle]
Returns the value of e.
exp number [Observer, Turtle]
e raised to the power of number.
get-random-seed [Observer, Turtle]
Returns the current random seed.
int number [Observer, Turtle]
Reports the largest integer less than or equal to number.
ln number [Observer, Turtle]
Natural logarithm of number.
log number base [Observer, Turtle]
Math function. Returns the log of
number according to specified base.
max number1 number2 [Observer, Turtle]
Reports the larger value of the two numbers.
maxnum [Observer, Turtle]
Returns the largest number possible without going into positive infinity.
min number1 number2 [Observer, Turtle]
Reports the smaller value of the two numbers.
minnum [Observer, Turtle]
Returns the smallest number possible without going into negative infinity.
number1 mod number2 [Observer, Turtle]
Modulo function. Number1 mod Number2 is equal to the remainder when Number1 is divided by Number2. The answer to mod is always positive.
not condition1 [Observer, Turtle]
Reports true if condition1 reports false.
condition1 or condition2 [Observer, Turtle]
Reports true if either condition1 or condition2
reports true.
pi [Observer, Turtle]
Returns the value of pi.
random number [Observer, Turtle]
Returns a random number between 0 and number, including 0 but
not number, based on a uniform distribution.
random-gaussian number [Observer, Turtle]
Returns a random number with mean 0 and standard deviation number.
round number [Observer, Turtle]
Reports the integer closest to number.
set-random-seed integer [Observer]
Sets the random see to integer. Integers allowed are in the range
-(2^31) to (2^31 -1).
sin number [Observer, Turtle]
Trigonometry functions. Returns the sine of the specified angle. All angles are in degrees
sqrt number [Observer, Turtle]
Finds the square root of number.
tan number [Observer, Turtle]
Trigonometry functions. Returns the tangent of the specified angle. All angles are in degrees.
condition1 xor condition2 [Observer,
Turtle]
Reports the value of condition1 xor condition2