Struct fixed#

Struct Documentation#

struct fixed#

Fixed data type is based on the double data type. Highest value is 31 digits positive and lowest 31 digits negative. The best precision is 1/31.

Unnamed Group

inline constexpr operator double() const#

Contained value as double.

Returns:

The value

inline constexpr operator const double&() const#

Contained value as double.

Returns:

The value

inline constexpr operator double&()#

Contained value as double.

Returns:

The value

Public Functions

template<typename TType>
inline constexpr fixed(TType tValue)#

Constructor.

Template Parameters:

TType – Type of the value to create a fixed type of

Parameters:

tValue[in] The value to assign

template<typename TType>
inline fixed &operator=(TType tValue)#

Assignment operator.

Template Parameters:

TType – Type of the value to assign

Parameters:

tValue[in] The value to assign

Returns:

Reference to this class

inline fixed constexpr operator+() const#

Unary operator to return a fixed type.

Returns:

the fixed type as a copy from this class.

inline fixed constexpr operator-() const#

Unary operator to return a negative fixed type.

Returns:

the fixed type as a copy from this class.

Public Members

double dValue#

The value.