jsuya pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a4525cb4bdc207611bca2d8b3997ddd9c7b908d

commit 4a4525cb4bdc207611bca2d8b3997ddd9c7b908d
Author: Wonki Kim <wonki_....@samsung.com>
Date:   Thu Nov 21 17:43:42 2019 +0900

    eina_matrix: replace cosf by cos to gain more accuracy
    
    Summary:
    cos function is much much more accurate than cosf.
    this patch replaces cosf by cos to gain more accuracy.
    
    Reviewers: cedric, jsuya, vtorri
    
    Subscribers: vtorri, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D10695
---
 src/lib/eina/eina_matrix.c        | 4 ++--
 src/tests/eina/eina_test_matrix.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eina/eina_matrix.c b/src/lib/eina/eina_matrix.c
index ad7cdb03ff..7c30d1e767 100644
--- a/src/lib/eina/eina_matrix.c
+++ b/src/lib/eina/eina_matrix.c
@@ -551,8 +551,8 @@ eina_matrix3_rotate(Eina_Matrix3 *m, double rad)
     *       Later we would want someone to look at this and improve accuracy.
     */
 #if 1
-   c = cosf(rad);
-   s = sinf(rad);
+   c = cos(rad);
+   s = sin(rad);
 #else
    /* normalize the angle between -pi,pi */
    rad = fmod(rad + M_PI, 2 * M_PI) - M_PI;
diff --git a/src/tests/eina/eina_test_matrix.c 
b/src/tests/eina/eina_test_matrix.c
index ac3afa827f..2fa860c251 100644
--- a/src/tests/eina/eina_test_matrix.c
+++ b/src/tests/eina/eina_test_matrix.c
@@ -463,8 +463,8 @@ EFL_START_TEST(eina_matrix3_operations)
    fail_if (!MATRIX3_CMP(m1.xx, m1.xy, m1.xz,
                          m1.yx, m1.yy, m1.yz,
                          m1.zx, m1.zy, m1.zz,
-                         cosf(rotate_radian), -sinf(rotate_radian), 0,
-                         sinf(rotate_radian),  cosf(rotate_radian), 0,
+                         cos(rotate_radian), -sin(rotate_radian), 0,
+                         sin(rotate_radian),  cos(rotate_radian), 0,
                          0, 0, 1));
 
    eina_matrix3_values_set(&m1,

-- 


Reply via email to