The smallest positive non-zero value that a float can represent. Using Mathf.Epsilon as a delta for equality makes the comparison effectively identical to exact equality on normal-range numbers. For an approximately equal value, use Mathf.Approximately or a tolerance that reflects your data’s scale, typically a combination of absolute and relative tolerances.
Operations with Epsilon follow these rules:
A value between any number and Epsilon will result in an arbitrary number due to loss of trailing digits.
using UnityEngine;
public class Example : MonoBehaviour { // Avoid division by (near) zero using Mathf.Epsilon as a zero guard. float SafeDivide(float numerator, float denominator) { if (Mathf.Abs(denominator) <= Mathf.Epsilon) return 0f; // or handle appropriately
return numerator / denominator; } }