touchgfx::CWRUtil::Q15 is only used within TouchGFX.
 
Symbols
loading...
Files
loading...

touchgfx::CWRUtil::Q15 class

@class Q15 CWRUtil.hpp touchgfx/widgets/canvas/CWRUtil.hpp Defines a number with 15 bits reserved for fraction. Defines a 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. Q5*Q5=Q10, Q10/Q5=Q5, ... @see Q5 @see Q10 @see http://en.wikipedia.org/wiki/Q_%28number_format%29 @see http://en.wikipedia.org/wiki/Fixed-point_arithmetic

Syntax

class Q15;
Implemented in CWRUtil.hpp:409

Fields

v

No summary provided. Read more...

Methods

operator-() const

@fn Q15 Q15::operator-() const Negation operator. Negation operator. Read more...

operator+() const

@fn Q15 Q15::operator+(const Q15& q15) const Addition operator. Addition operator. Read more...

operator/() const

@fn Q10 Q15::operator/(const Q5& q5) const Q5 / Q5 which requires the result of a Q15 / Q5 to be calculated. Q5 / Q5 which requires the result of a Q15 / Q5 to be calculated. Read more...

References

LocationReferrerScopeText
CWRUtil.hpp:409
class Q15
CWRUtil.hpp:44
class Q15;
CWRUtil.hpp:191touchgfx::CWRUtil::Q5::operator*() const
Q5 operator*(const Q15& q15) const
CWRUtil.hpp:368touchgfx::CWRUtil::Q10::operator*() consttouchgfx::CWRUtil::Q10
Q15 operator*(const Q5& q5) const
CWRUtil.hpp:370touchgfx::CWRUtil::Q10::operator*() const
return Q15(v * int(q5));
CWRUtil.hpp:449touchgfx::CWRUtil::Q15::operator-() consttouchgfx::CWRUtil::Q15
Q15 operator-() const
CWRUtil.hpp:451touchgfx::CWRUtil::Q15::operator-() const
return Q15(-v);
CWRUtil.hpp:465touchgfx::CWRUtil::Q15::operator+() consttouchgfx::CWRUtil::Q15
Q15 operator+(const Q15& q15) const
CWRUtil.hpp:467touchgfx::CWRUtil::Q15::operator+() const
return Q15(v + q15.v);
CWRUtil.hpp:558touchgfx::CWRUtil::sine()touchgfx::CWRUtil
static Q15 sine(int i)
CWRUtil.hpp:575touchgfx::CWRUtil::sine()
return Q15(sineTable[i]);
CWRUtil.hpp:579touchgfx::CWRUtil::sine()
return Q15(sineTable[180 - i]);
CWRUtil.hpp:583touchgfx::CWRUtil::sine()
return Q15(-int32_t(sineTable[i - 180]));
CWRUtil.hpp:585touchgfx::CWRUtil::sine()
return Q15(-int32_t(sineTable[360 - i]));
CWRUtil.hpp:607touchgfx::CWRUtil::sine()touchgfx::CWRUtil
static Q15 sine(Q5 i)
CWRUtil.hpp:612touchgfx::CWRUtil::sine()
Q15 sineLow = sine(i.to<int>());
CWRUtil.hpp:617touchgfx::CWRUtil::sine()
Q15 sineHigh = sine(i.to<int>() + 1);
CWRUtil.hpp:619touchgfx::CWRUtil::sine()
return Q15(muldiv(int(sineHigh - sineLow), fraction, Rasterizer::POLY_BASE_SIZE, remainder)) + sineLow;
CWRUtil.hpp:637touchgfx::CWRUtil::cosine()touchgfx::CWRUtil
static Q15 cosine(int i)
CWRUtil.hpp:656touchgfx::CWRUtil::cosine()touchgfx::CWRUtil
static Q15 cosine(Q5 i)

Type Use

Variables of touchgfx::CWRUtil::Q15 type
touchgfx::CWRUtil::Q15
Allocators of touchgfx::CWRUtil::Q15
Deletors of touchgfx::CWRUtil::Q15
touchgfx::CWRUtil::sine()::sineLow
touchgfx::CWRUtil::sine()::sineHigh
all items filtered out
touchgfx::CWRUtil::Q15
touchgfx::CWRUtil::sine()::sineLow
touchgfx::CWRUtil::sine()::sineHigh
all items filtered out