MCPcopy Create free account
hub / github.com/SpartanJ/eepp / rotate

Method rotate

src/eepp/graphics/batchrenderer.cpp:616–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616void BatchRenderer::rotate( const Vector2f& center, Vector2f* point, const Float& angle ) {
617 if ( angle ) {
618 Float x = point->x - center.x;
619 Float y = point->y - center.y;
620 point->x = x * Math::cosAng( angle ) - y * Math::sinAng( angle ) + center.x;
621 point->y = x * Math::sinAng( angle ) + y * Math::cosAng( angle ) + center.y;
622 }
623}
624
625void BatchRenderer::pointsBegin() {
626 setDrawMode( PRIMITIVE_POINTS, true );

Callers 1

batchQuadFreeExMethod · 0.45

Calls 2

cosAngFunction · 0.85
sinAngFunction · 0.85

Tested by

no test coverage detected