Q15
Defines a "floating point number" with 15 bits reserved for the fractional part of the decimal number. Q15 is only used for sine/cosine and for intermediate calculations when multiplying.
Public Functions
operator int() const | |
Gets the Q15 as an integer without conversion. | |
Q15 | operator+(const Q15 & q15) const |
Addition operator. | |
Q15 | operator-() const |
Negation operator. | |
Q10 | operator/(const Q5 & q5) const |
Calculate Q15 / Q5 as a Q10. | |
Q15(int i) | |
Constructor from integer. | |
Public Functions Documentation
operator int
operator int | ( | ) | const |
operator+
operator-
Q15 operator- | ( | ) | const |
Negation operator.
Returns:
The negative value of this.