Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
// Some helper math methods
public static class Math {
public static bool almost_equal(float x, float y, float precision=1e-4f)
{
return Mathf.Abs(x - y) < precision;
}
public static bool almost_equal(Vector2 a, Vector2 b, float precision = 1e-4f)
{