Use fabsf() rather than abs()
abs() operates on integers -- to check floats accurately, fabsf should be used. Change-Id: I1a4e85f8f5e0d08ff38d307c5c31e2b6783ab7af Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user