From c44958c78632162d2473ce3e86bef97f020ff4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Mon, 17 Nov 2014 21:48:46 +0100 Subject: [PATCH] Use fabsf() rather than abs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit abs() operates on integers -- to check floats accurately, fabsf should be used. Change-Id: I1a4e85f8f5e0d08ff38d307c5c31e2b6783ab7af Signed-off-by: Bernhard Rosenkränzer --- libs/hwui/AmbientShadow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/AmbientShadow.cpp b/libs/hwui/AmbientShadow.cpp index 2d1cf78dcc77b..f11437b060125 100644 --- a/libs/hwui/AmbientShadow.cpp +++ b/libs/hwui/AmbientShadow.cpp @@ -128,7 +128,7 @@ inline void computeBufferSize(int* totalVertexCount, int* totalIndexCount, } inline bool needsExtraForEdge(float firstAlpha, float secondAlpha) { - return abs(firstAlpha - secondAlpha) > ALPHA_THRESHOLD; + return fabsf(firstAlpha - secondAlpha) > ALPHA_THRESHOLD; } /**