Fix QuaternionUtils.lookAt() precision issue
Arccosine (qACos) is only valid for values between -1 and 1 and will
return NaN values otherwise. Due to precision errors the input value can
be slightly bigger or smaller. Therefore the input needs to be clamped.
As a driveby we normalize forwardDirection and also update
QSSGRenderCamera to bind dot to [-1..1].
Fixes: QTBUG-143886
Pick-to: 6.11 6.10 6.8
Change-Id: I7d67fe7c87642766343c49126b18bd82a21d60d2
Reviewed-by: Inho Lee <inho.lee@qt.io>
| commit | e8ffe2c88f831e0a69e6ed6ea17bdbb0c2828f3f |
| parent | 39ecad155ee6e69dd9382d34188d1f50892e35fe |
| author | Jonas Karlsson <jonas.karlsson@qt.io> |
| committer | Jonas Karlsson <jonas.karlsson@qt.io> |
| commit time | Tue, 17 Feb 2026 07:26:52 +0100 |