/// <summary> /// Returns new array containing transformed points. /// </summary> public static V2d[] TransformedPos(this V2d[] pointArray, M33d m) { return(new V2d[pointArray.LongLength].SetByIndexLong(i => m.TransformPos(pointArray[i]))); }
/// <summary> /// Returns new polygon with point transformed. /// </summary> public static IImmutablePolygon <V2d> TransformPoint(this IImmutablePolygon <V2d> self, int index, M33d trafo) => self.SetPoint(index, trafo.TransformPos(self.Points[index]));