Types
To write formulas, you need to be aware of the concept of types. Expressions (constants, variables,
parameters, etc.) in formulas can have different types. Ultra Fractal supports five types. The
following table shows each type and explains it use.
bool
Boolean expressions can only have two values: true or false. This type is returned
when expressions are compared:
3 < 4 ; true
false == true ; false
int
Integers are useful for counting. They can have values from 2147483648 to
2147483647. Most arithmetic operations can be performed on integers. Example:
3
2
float
Floating point numbers are the most familiar type of numbers. They can be very
small or large, and have virtually unlimited precision (see
Arbitrary precision
).
Their greatest benefit is that they can represent fractional values. Examples:
3.1
2.9
1.3e7
complex
Complex expressions represent complex numbers. They consist of two floating
point numbers and are used to perform complex arithmetic, which is very useful
for fractal calculations. Examples:
(2.8, 4)
2.8 + 4i
color
Color expressions represent a color. You can perform operations on colors and
store them in color variables. Internally, a color is stored as four floating point
values, corresponding to red, green, blue, and alpha (opacity) components. Each
value ranges from 0 to 1. Colors are intended only for
direct coloring algorithms
.
Next:
Constants
See Also
Expressions
Type compatibility
Operators
Functions
269
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved