Boris Chiou 024f384522 Bug 1850841 - Tweak the formula of computing the ratio of quaternionA in Slerp algorithm. r=emilio
When the progress is 100%, the result from the original formula of calculating
`left_weight` may not be 0 exactly (i.e. approximate zero, e.g. -2.22e-16), and
so this imprecision makes the recomposed Matrix3D have some approximate zeros.

Those approximate zeros (e.g. `_m13` is 2e-16, and `_m23` is 8e-17 in WPT)
make us failed to treat this Matrix3D as a 2D matrix when we serializing it
(because we use `!= 0.0f` to check if the matrix components are not equal to
zero in `Matrix4x4::Is2D()`, and other places).

Differential Revision: https://phabricator.services.mozilla.com/D187814
2023-09-11 20:17:51 +00:00
..