This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |