sw_engine: fix loss of data when it's converting. 14/241414/1
authorHermet Park <chuneon.park@samsung.com>
Thu, 20 Aug 2020 03:18:51 +0000 (12:18 +0900)
committerHermet Park <chuneon.park@samsung.com>
Thu, 20 Aug 2020 03:18:51 +0000 (12:18 +0900)
if SwCoord type is determined to 4byte,
it could lose remarkable value that occur stroking jiggling.

This fixes the issue.

Change-Id: Ib2fed2a3bfc9188a30522f35837439364d446a73

src/lib/sw_engine/tvgSwMath.cpp

index 5227d79..b3cf477 100644 (file)
@@ -29,7 +29,7 @@
 /* Internal Class Implementation                                        */
 /************************************************************************/
 
-constexpr SwCoord CORDIC_FACTOR = 0xDBD95B16UL;            //the Cordic shrink factor 0.858785336480436 * 2^32
+constexpr SwFixed CORDIC_FACTOR = 0xDBD95B16UL;       //the Cordic shrink factor 0.858785336480436 * 2^32
 
 //this table was generated for SW_FT_PI = 180L << 16, i.e. degrees
 constexpr static auto ATAN_MAX = 23;