# How to flip a quad (openGL es 2.0 Android / Java)

How would one go about ‘flipping’ a quad, either horizontally or vertically? (Just a single quad, not everything in view).

I know how to rotate a quad, this is my rotation method:

``````public void rotate(float x, float y, int angle){

//Convert co-ordinates (Following section just converts my coordinates

//Left hand
xPlotLeft = (-MyGLRenderer.ratio)+((x)*MyGLRenderer.coordStepAmountWidth);
//Top
yPlotTop = +1-((y)*MyGLRenderer.coordStepAmountHeight);
//Right hand
//Bottom

//Center of quad (Along the x)
centreX = xPlotLeft + ((xPlotRight-xPlotLeft)/2);
//Center of quad (Along the y)
centreY = yPlotBottom + ((yPlotTop-yPlotBottom)/2);

Matrix.setIdentityM(mRotationMatrix, 0);
Matrix.translateM(mRotationMatrix, 0, centreX, centreY, 0f);
Matrix.rotateM(mRotationMatrix, 0, -angle, 0, 0, 0.1f);
Matrix.translateM(mRotationMatrix, 0, -centreX, -centreY, 0f);

}
``````

I’m unsure how to do something similar just to flip (or ‘mirror’) the quad.