protected virtual Vector2[] ToLocal(Vector2[] points, Pose2D target)
        {
            TMatrix2D rotmx = target.ToGlobalMatrix();

            Vector2[] local = new Vector2[(points.Length - 1) + 1];
            int       len   = points.Length - 1;

            for (int i = 0; i <= len; i++)
            {
                local[i] = (Vector2)(rotmx * points[i]);
            }
            return(local);
        }
        protected virtual Vector2[] ToLocal(Vector2[] points, Pose2D target)
        {
            int i2;

            TMatrix2D rotmx = target.ToGlobalMatrix();

            Vector2[] local = new Vector2[checked (checked (checked ((int)points.Length) - 1) + 1)];
            int       i1    = checked (checked ((int)points.Length) - 1);
            int       i     = 0;

            while (i <= i2)
            {
                local[i] = rotmx * points[i];
                i        = checked (i + 1);
                i2       = i1;
            }
            return(local);
        }