예제 #1
0
        public static bool IsShorterThen(this IntPoint pointToCheck, long len)
        {
            if (pointToCheck.X > len || pointToCheck.X < -len)
            {
                return(false);
            }

            if (pointToCheck.Y > len || pointToCheck.Y < -len)
            {
                return(false);
            }

            return(pointToCheck.LengthSquared() <= len * len);
        }
예제 #2
0
 public static long Length(this IntPoint pointToMeasure)
 {
     return((long)Math.Sqrt(pointToMeasure.LengthSquared()));
 }