Is Mathf.Approximately(0.0f, float.Epsilon) == true its correct behavior?
Here is the decompiled code of Unity's public static bool Mathf.Approximately(float a, float b);
You can see the * 8.0f
at the end ^^, so a truely badly documented method indeed.
/// <summary>
/// <para>Compares two floating point values if they are similar.</para>
/// </summary>
/// <param name="a"></param>
/// <param name="b"></param>
public static bool Approximately(float a, float b)
{
return (double) Mathf.Abs(b - a) < (double) Mathf.Max(1E-06f * Mathf.Max(Mathf.Abs(a),
Mathf.Abs(b)), Mathf.Epsilon * 8.0f);
}