MCPcopy Create free account
hub / github.com/chrxh/alien / calcRotationMatrix

Method calcRotationMatrix

source/Base/Math.cpp:39–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39RealMatrix2D Math::calcRotationMatrix(float angle)
40{
41 RealMatrix2D result;
42 result[0][0] = cosf(angle * Const::DegToRad);
43 result[1][0] = sinf(angle * Const::DegToRad);
44 result[0][1] = -result[1][0];
45 result[1][1] = result[0][0];
46 return result;
47}
48
49RealVector2D Math::rotateClockwise(RealVector2D const& v, float angle)
50{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected