![]() |
![]() |
![]() |
Liboil Reference Manual | ![]() |
---|---|---|---|---|
The functions in this section perform type conversion.
The <i>convert</i> functions convert value from the source type to the destination type. Conversion of values outside the destination range are saturated to the destination range.
The <i>scaleconv</i> functions multiply the source values by a constant factor before converting to the destination type. Conversion of values outside the destination range are clamped to the destination range.
Conversion of values from floating point types to integer types is done using a round-to-nearest policy. Rounding of half-integers is undefined and may vary between implementations.