Fix AngleBetweenVectorsInDegrees NAN
Fixes potential NANs from gfx::AngleBetweenVectorsInDegrees and gfx::ClockwiseAngleBetweenVectorsInDegrees when the given vectors are very close together by clamping the value passed to acos. When unclamped, the value passed to acos could be slightly outside [-1, 1] due to floating point precision. Bug: 918734 Change-Id: I55b75b21581d25134fdc3e8e6db80892607a807c Reviewed-on: https://chromium-review.googlesource.com/c/1394086Reviewed-by:Ian Vollick <vollick@chromium.org> Commit-Queue: Brian Sheedy <bsheedy@chromium.org> Cr-Commit-Position: refs/heads/master@{#619780}
Showing
Please register or sign in to comment