示例#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;
 }