SuperImageEvolver.DNA.ShiftPoints C# (CSharp) Method

ShiftPoints() static private method

static private ShiftPoints ( Shape shape, int shift ) : Shape
shape Shape
shift int
return Shape
        static Shape ShiftPoints(Shape shape, int shift)
        {
            var copy = new Shape(shape);
            int offset = shift%shape.Points.Length;
            Array.Copy(shape.Points, offset, copy.Points, 0, shape.Points.Length - offset);
            Array.Copy(shape.Points, 0, copy.Points, shape.Points.Length - offset, offset);
            return copy;
        }