I’m having trouble doing simple float2 or float3 equality comparisons. Using a.Equals(b) gave better results than a == b but I’m looking for a Unity.Mathematics equivalent to Mathf.Approximately(a.x, b.x) && Mathf.Approximately(a.y, b.y) and am not finding anything in the docs.
Am I missing something, or is the Mathf workaround just normal? I was hoping I could avoid using the UnityEngine assembly at all in my pure ECS stuff.
I don’t think there’s a built-in function, but here’s the Mathf implementation (along with an uncharacteristically helpful comment) in case you want to roll your own helper function: