Beispiel #1
0
        public NormalVector2 GetNormalized()
        {
            NormalVector2 v = new NormalVector2(this);

            v.Normalize();
            return(v);
        }
Beispiel #2
0
 public NormalVector2(NormalVector2 v)
 {
     this.x = v.x;
     this.y = v.y;
 }
Beispiel #3
0
 public static float Distance(NormalVector2 a, NormalVector2 b)
 {
     return(Magnitude(a - b));
 }
Beispiel #4
0
 public static float Magnitude(NormalVector2 a)
 {
     return(NormalVector2.SqrMagnitude(a));
 }
Beispiel #5
0
 public static float SqrMagnitude(NormalVector2 a)
 {
     return(a.x * a.x + a.y * a.y);
 }