SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ As() [1/2]

template<typename T>
requires std::integral<T>
T SRL::Math::Types::Fxp::As ( ) const
inlineconstexpr

Converts to the specified integer type.

Template Parameters
TThe target integer type
Returns
Value as the specified type

Example:

Fxp x = 3.14_fxp;
auto i = x.As<int16_t>(); // Convert to int
constexpr T As() const
Converts to the specified integer type.
Definition fxp.hpp:441