I have built a run-time property inspector for a user customizable GUi system.
To my surprise an undocumented field showed up on all my Vector2 structs called “kEpsilon”.
What is this, why is it undocumented, and is there a way to tell that I should be hiding this from my users? (or maybe I shouldn’t?)
It can be used when comparing two vectors. Since they are floats it is hard to get them exactly equal. An example would be moving an object from one position to another. You can check the distance between then objects and then if they are closer than kEpsilon then they are equal.
It’s static according to
Vector2 v = new Vector2(2f,3f);
System.Reflection.FieldInfo[] fields = v.GetType().GetFields();
foreach (System.Reflection.FieldInfo info in fields) {
Debug.Log(info.Name + (info.IsStatic ? " static " : ""));
}