Skip to content
Matěj Štágl edited this page Dec 27, 2018 · 10 revisions

Maths component in Simplex serves a simple purpose - to provide a large library of number related functions, dealing with vectors, interpolations, trigonometry, time, matrices and other. Due to SGML being a strongly typed language, types are a very important topic when speaking about numbers. A different amount of memory is needed to hold different types of numbers, depending on whether the number is whole and how long it is. float, double and decimal types have fractional part. Not all types are listed below, just the most significant ones:

Type Range Used for
bool true & false Logical switch
byte -256 to 256 <0..1> is often mapped to <0..256>
short (int16) -32,768 to 32,767 Generally not used in Simplex
int (int32) -2,147,483,648 to 2,147,483,647 Used where whole numbers are expected most often
long (int64) -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Generally not used in Simplex
float (single) ±1.5 x 10−45 to ±3.4 x 1038 Used for vector operations
double ±5.0 × 10−324 to ±1.7 × 10308 Standard for most of math operations
decimal ±1.0 x 10–28 k ±7.9228 x 1028 Generally not used in Simplex

Sections

Back to Manual

Clone this wiki locally