Skip to content


style: Compare absolute dot-product to 1.0 when interpolating quatern…
Browse files Browse the repository at this point in the history

See the extended commit message for the following spec change:


Basically, by failing to take the absolute value, for certain content we can end
up doing division by zero which will mean that the test included in this patch
will cause an assertion to fail in debug builds and return
"matrix(NaN, NaN....)" in release builds.

Differential Revision:
  • Loading branch information
birtles authored and emilio committed Oct 28, 2018
1 parent ac873c7 commit 990f2c6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1829,7 +1829,7 @@ impl Animate for Quaternion {
self.3 * other.3)

if dot == 1.0 {
if dot.abs() == 1.0 {
return Ok(*self);

Expand Down

0 comments on commit 990f2c6

Please sign in to comment.