From 1762a8c4643fb5e9a3ec6ac4514a207c0c112c5d Mon Sep 17 00:00:00 2001 From: Deborshi Saha Date: Mon, 18 May 2015 11:14:19 +0200 Subject: [PATCH] embryo: fix inverse trigonometry functions typos. Summary: Issue: when asin,acos,atan functions were called from edc, wrong values were returned Solution: fixed asin,acos,atan functions in embryo script. Test Plan: embryo script functions asin,acos,atan to be called from edc and return value to be verified. Reviewers: Hermet, prince.dubey, shilpasingh, raster, cedric Reviewed By: shilpasingh, cedric Subscribers: rajeshps, govi, cedric Differential Revision: https://phab.enlightenment.org/D2512 Signed-off-by: Cedric BAIL --- AUTHORS | 1 + src/lib/embryo/embryo_float.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 956468ed52..ac070ec782 100644 --- a/AUTHORS +++ b/AUTHORS @@ -227,6 +227,7 @@ Embryo The Rasterman (Carsten Haitzler) Jérôme Pinot kumar Navneet +Deborshi Saha Eio --- diff --git a/src/lib/embryo/embryo_float.c b/src/lib/embryo/embryo_float.c index d84d73d3eb..84914774cf 100644 --- a/src/lib/embryo/embryo_float.c +++ b/src/lib/embryo/embryo_float.c @@ -338,7 +338,7 @@ _embryo_fp_asin(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) if (params[0] != (2 * sizeof(Embryo_Cell))) return 0; f = EMBRYO_CELL_TO_FLOAT(params[1]); - f = sinf(f); + f = asinf(f); f = _embryo_fp_degrees_to_radians(f, params[2]); return EMBRYO_FLOAT_TO_CELL(f); } @@ -352,7 +352,7 @@ _embryo_fp_acos(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) if (params[0] != (2 * sizeof(Embryo_Cell))) return 0; f = EMBRYO_CELL_TO_FLOAT(params[1]); - f = cosf(f); + f = acosf(f); f = _embryo_fp_degrees_to_radians(f, params[2]); return EMBRYO_FLOAT_TO_CELL(f); } @@ -366,7 +366,7 @@ _embryo_fp_atan(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params) if (params[0] != (2 * sizeof(Embryo_Cell))) return 0; f = EMBRYO_CELL_TO_FLOAT(params[1]); - f = tanf(f); + f = atanf(f); f = _embryo_fp_degrees_to_radians(f, params[2]); return EMBRYO_FLOAT_TO_CELL(f); }