public static FixedPoint Distance(FixedPointVector2 v1, FixedPointVector2 v2) { unchecked { FixedPoint x = v1.X - v2.X; FixedPoint y = v1.Y - v2.Y; FixedPoint f = x * x + y * y; return(f.Sqrt()); } }
public FixedPoint GetLength() { unchecked { FixedPoint result = X * X + Y * Y; if (result > FixedPoint.Zero) { result = result.Sqrt(); } return(result); } }