Flip Vertices Array
- by James
Hi,
I have an array of position vertices that make up a 2D polygon.
Vector2[] _chassisConcaveVertices =
{
new Vector2(5.122f, 0.572f),
new Vector2(3.518f, 0.572f),
new Vector2(3.458f, 0.169f),
new Vector2(2.553f, 0.169f),
new Vector2(2.013f, 0.414f),
new Vector2(0.992f, 0.769f),
new Vector2(0.992f, 1.363f),
new Vector2(5.122f, 1.363f),
};
What algorithm can I use to modify the positions so the resultant polygon is flipped? I need to flip the polygon both horizontally and vertically.