touchgfx::CWRUtil::sine() method
@fn static Q15 sine(int i) Find the value of sin(i) with 15 bits precision. Find the value of sin(i) with 15 bits precision. The returned value can be converted to a floating point number and divided by (1<<15) to get the rounded value of of sin(i). By using this function, a complete circle can be drawn without the need for using floating point math.
Arguments
i
the angle in degrees. The angle follows the angles of the clock, 0 being straight up and 90 being 3 o'clock.
Return value
the value of sin(i) with 15 bits precision on the fractional part.
Examples
touchgfx::CWRUtil::sine() is referenced by
3 libraries and example projects.
Functions calling touchgfx::CWRUtil::sine()
Functions called by touchgfx::CWRUtil::sine()
touchgfx::CWRUtil::sine()
Data read by touchgfx::CWRUtil::sine()
Data written by touchgfx::CWRUtil::sine()
touchgfx::CWRUtil::sine()
Type of touchgfx::CWRUtil::sine()
touchgfx::CWRUtil::sine()