MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / rotate

Method rotate

src/Core/Transform/Rect.cpp:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 }
34
35 void Rect::rotate(double angle, Transform::UnitVector origin)
36 {
37 const double radAngle = Utils::Math::convertToRadian(-angle);
38
39 m_position = rotatePointAroundCenter(origin, m_position, radAngle);
40 m_angle += angle;
41 if (m_angle < 0 || m_angle > 360)
42 m_angle = Utils::Math::normalize(m_angle, 0, 360);
43 }
44
45 void Rect::transformRef(
46 UnitVector& vec, const Referential& ref, ConversionType type) const

Callers 2

setRotationMethod · 0.95
LoadClassUnitVectorFunction · 0.45

Calls 3

convertToRadianFunction · 0.85
rotatePointAroundCenterFunction · 0.85
normalizeFunction · 0.50

Tested by

no test coverage detected