MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / Rotate

Method Rotate

engine/src/vector.cpp:71–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void Vector2::Rotate(float angle)
72{
73 float xt = (this->x * cosf(angle)) - (this->y * sinf(angle));
74 float yt = (this->y * cosf(angle)) + (this->x * sinf(angle));
75 this->x = xt;
76 this->y = yt;
77}
78
79float Vector2::CrossProduct(const Vector2 &rhs) const
80{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected