Пример #1
0
        public FixVector2 GetNormalized()
        {
            FixVector2 v = new FixVector2(this);

            v.Normalize();
            return(v);
        }
Пример #2
0
 public static Fix64 Magnitude(FixVector2 a)
 {
     return(Fix64.Sqrt(FixVector2.SqrMagnitude(a)));
 }
Пример #3
0
 public static Fix64 SqrMagnitude(FixVector2 a)
 {
     return(a.x * a.x + a.y * a.y);
 }
Пример #4
0
 public static Fix64 Distance(FixVector2 a, FixVector2 b)
 {
     return(Magnitude(a - b));
 }
Пример #5
0
 public FixVector2(FixVector2 v)
 {
     this.x = v.x;
     this.y = v.y;
 }