Compile-time constructor for numeric types other than int16_t.
- Template Parameters
-
T | Numeric type (e.g., float, double, int32_t) |
- Parameters
-
value | The value to convert to fixed-point |
This constructor is only available at compile time. For runtime conversions, use Convert():
constexpr Fxp a = 3.14159;
static constexpr Fxp Convert(const T &value)
Convert integral type to fixed-point with compile-time range validation.
Definition fxp.hpp:156
- Note
- Only available at compile time (consteval).
- Warning
- Values outside the valid fixed-point range may cause overflow.