GeoGen Script reference

Following table lists supported operators grouped in descending order by precedence:
Group  Prec.  Ass.  Op.  Description  Operands  Result 

Primary  1  LTR  .  Member access  Object  Object 
[]  Index access  Object, Object...  Object  
()  Function call  Object, Object...  Object  
Unary  2  RTL  ++  Increment (postfix and prefix)  Number  Number 
–  Decrement (postfix and prefix)  Number  Number  
!  Negation  Number/Boolean  Number/Boolean  
+  Unary plus  Number  Number  
  Unary minus  Number  Number  
@  Relative coordinate/point  Number/Coordinate/Point  Point/Coordinate  
Multiplicative  3  LTR  *  Multiplication  Number, Number  Number 
/  Division  Number, Number  Number  
%  Modulo (integer remainder)  Number, Number  Number  
Additive  4  +  Addition  Number, Number  Number  
  Subtraction  Number, Number  Number  
Bit shift  5  <<  Bit shift left  Number, Number  Number  
>>  Bit shift right  Number, Number  Number  
Relational  6  <  Less than  Number, Number  Boolean  
<=  Less than or equal to  Number, Number  Boolean  
>  Greater than  Number, Number  Boolean  
>=  Greater than or equal to  Number, Number  Boolean  
Equality  7  ==  Equal to  Object/null, Object/null  Boolean  
!=  Not equal to  Object/null, Object/null  Boolean  
Bit and  8  &  Bit and  Number/Boolean, Number/Boolean  Number/Boolean  
Bit xor  9  ^  Bit xor (exclusive or)  Number/Boolean, Number/Boolean  Number/Boolean  
Bit or  10    Bit or (inclusive or)  Number/Boolean, Number/Boolean  Number/Boolean  
Logical and  11  &&  Logical and  Boolean, Boolean  Boolean  
Logical or  12    Logical or  Boolean, Boolean  Boolean  
Conditional  13  ?:  Conditional ternary  Boolean, Object/null, Object/null  Object/null  
Assignment  14  RTL  =  Assignment  Object, Object/null  Object 
+=  Addition assignment  Number, Number  Number  
=  Subtraction assignment  Number, Number  Number  
*=  Multiplication assignment  Number, Number  Number  
/=  Division assignment  Number, Number  Number  
%=  Modulo assignment  Number, Number  Number  
<<=  Bit shift left assignment  Number, Number  Number  
>>=  Bit shift right assignment  Number, Number  Number  
&=  Bit and assignment  Number/Boolean, Number/Boolean  Number/Boolean  
^=  Bit xor assignment  Number/Boolean, Number/Boolean  Number/Boolean  
=  Bit or assignent  Number/Boolean, Number/Boolean  Number/Boolean  
Comma  15  LTR  ,  Argument list 
Operators %, <<, >>, %=, <<= and >>= treat the second argument as an integer (rounding down).
Bit operators which return Number or Boolean will return Boolean as long as both the operands are of type Boolean, otherwise Number will be returned. Both of the operands must be of the same type (eg. 2 & true
is not legal).
Operator @ returns Point as long as its operand was a Point, otherwise it returns a Coordinate.