portability: fixing windows warnings 03/289003/1
authorMira Grudzinska <m.grudzinska@samsung.com>
Thu, 20 Jan 2022 12:52:57 +0000 (13:52 +0100)
committerMichal Szczecinski <mihashco89@gmail.com>
Mon, 27 Feb 2023 08:25:46 +0000 (09:25 +0100)
atan2->atan2f

Change-Id: Ia7572db01a26e0b7d5a6d3ed610cda407a27375f

src/lib/sw_engine/tvgSwRasterTexmapInternal.h
src/lib/tvgMath.h

index 0cf6cff..f31ea1e 100644 (file)
@@ -58,8 +58,8 @@
     y = yStart;
 
     while (y < yEnd) {
-        x1 = _xa;
-        x2 = _xb;
+        x1 = (int32_t)_xa;
+        x2 = (int32_t)_xb;
 
         if (!region) {
             minx = INT32_MAX;
@@ -160,4 +160,4 @@ next:
     xb = _xb;
     ua = _ua;
     va = _va;
-}
\ No newline at end of file
+}
index d4d3ad9..6120216 100644 (file)
@@ -47,7 +47,7 @@ static inline bool mathEqual(float a, float b)
 
 static inline bool mathRightAngle(const Matrix* m)
 {
-   auto radian = fabsf(atan2(m->e21, m->e11));
+   auto radian = fabsf(atan2f(m->e21, m->e11));
    if (radian < FLT_EPSILON || mathEqual(radian, float(M_PI_2)) || mathEqual(radian, float(M_PI))) return true;
    return false;
 }