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>
commite8ffe2c88f831e0a69e6ed6ea17bdbb0c2828f3f
parent39ecad155ee6e69dd9382d34188d1f50892e35fe
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeTue, 17 Feb 2026 07:26:52 +0100