summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorLazar Trsic <Lazar.Trsic@imgtec.com>2015-06-23 11:46:49 +0200
committerNikola Veljkovic <Nikola.Veljkovic@imgtec.com>2015-06-25 11:11:55 +0200
commitb561f39d01c211425bfefaaa7b31ebe097e7ba79 (patch)
tree32553696e76e3ca1757a6c2d8862bb57fe3841f2 /rs/java/android/renderscript/RenderScript.java
parente6734b6b1247577ebdeacff441f6ab8cfe25a1e3 (diff)
Limit dotProduct value to 1.0f, so acosf would not return NaN.
Due to precision loss of float math, we sometimes get 1.000001f for dotProduct. This causes NaN result from acosf() and floor() funcs. At the moment, this does not cause any problems on ARM, as casting NaN to int results in 0. On mips however (possibly on x86), such cast gives INT_MAX, so crash occurs when trying to use the resulting value. Change-Id: I8e0285a0306a65b8469d9f4885c19665066fc4c8
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions