The MAXON API defines multiple primitive mathematical data types. These data types are the building blocks for more complex data types.
maxon::Bool stores a Boolean value.
bool
.Different integer type of the sizes 16, 32 and 64 bit are defined:
int16_t
.uint16_t
.int32_t
.uint32_t
.int64_t
.uint64_t
.If such a integer value should be converted to a floating point value one must consider the limits of such conversion. Values outside that limit will result in an overflow.
Floating point data types are available in 32 and 64 bit size:
float
.double
.Floating point data is a complex data type that could be corrupted.
Two floating point values (that are not exactly zero) should not be compared with "==".
Different floating point data types have different minimum and maximum values:
Multiplying two float values could result in an overflow. These constants define safe ranges that can be used without the risk of such an overflow.
When a floating point value is converted into another scalar value it could easily exceed the range of valid values of the target type. A safe conversation is done with:
A character is a single symbol.
char
.unsigned
char.char32_t
.char16_t
char
.See also String Manual.
The Limit template class defines the minimum and maximum vale a given scalar type can store. An example is maxon::LIMIT<maxon::Int64>: