We are developing a game targeted at Windows 8 x86 and ARM. We have discovered a difference in behaviour in the default implementation of Settings.MixFriction() when both friction values are very large.
On x86, Settings.MixFriction(float.MaxValue, float.MaxValue) returns float.MaxValue, as you would expect.
On ARM, the same call returns float.Infinity. This makes constraint solving never return due to NANs in the calculations from dividing by infinity.
We figure this is because x86 may be implicitly upcasting each parameter to a double before the multiply in MixFriction, whereas ARM keeps them at single precision for the multiply resulting in an overflow. Our quick fix was to explicitly upcast to
This allows ARM to behave the same as x86.
return (float) Math.Sqrt((double)friction1 * (double)friction2);