Constants are values that stay static when time changes. A simple number like 5 is a constant. Constants can be used as multiplicators or to offset values. You can manually define a constant, e.g.
my_constant = 3.98;
From this statement on you can use my_constant as a static value in your statements. Constants can have different data types like floating point, vector or string. If you want to compile your expression you need to initialize the contant:
double my_constant = 3.98;
Refer also to the Compile section of this manual how to define a data type for a constant if you want to compile your expression.
To avoid having you define common constants like pi and the like every time you want to use that value in an expression, you can simply type pi and Xpressionist will automatically assign the value into your expression. All constants available in Xpressionist are listed below.
Since the syntax of Xpressionist is very open in normal mode you can also type
pi = 2;
In this case you have assigned pi a new value. From this statement on Xpressionist will assign the value 2 whenever pi is used in one of the following expressions.
Xpressionist provides you with various constants which will be colored red with bold letters if you use them in your script. Here is a list of all available constants in Xpressionist:
|