|
inlinestaticconstexpr |
Convert integral type to fixed-point with compile-time range validation.
T | Integral type (e.g., int, int32_t) |
value | The value to convert |
Converts an integral value to 16.16 fixed-point format with compile-time validation. Using int16_t{value} ensures the value fits within the valid range (-32768 to 32767). The compiler will warn if the value is outside this range.
This is a RUNTIME conversion method. For compile-time conversion, prefer using the Fxp constructor directly with constexpr when possible.
Example: