MCPcopy Create free account
hub / github.com/ddnet/ddnet / Rotate

Function Rotate

src/game/map/render_map.cpp:362–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362static void Rotate(const CPoint *pCenter, CPoint *pPoint, float Rotation)
363{
364 int x = pPoint->x - pCenter->x;
365 int y = pPoint->y - pCenter->y;
366 pPoint->x = (int)(x * std::cos(Rotation) - y * std::sin(Rotation) + pCenter->x);
367 pPoint->y = (int)(x * std::sin(Rotation) + y * std::cos(Rotation) + pCenter->y);
368}
369
370void CRenderMap::ForceRenderQuads(CQuad *pQuads, int NumQuads, int RenderFlags, IEnvelopeEval *pEnvEval, float Alpha)
371{

Callers 1

ForceRenderQuadsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected