Remove RadianToDegree macro from ModelTypes

We can remove two macros from RageMath which are only used in a single place.
This commit is contained in:
sukibaby
2024-08-07 00:32:13 -07:00
committed by teejusb
parent 5e00535522
commit 6a2de50101
3 changed files with 19 additions and 3 deletions
+17
View File
@@ -29,6 +29,23 @@ AnimatedTexture::~AnimatedTexture()
Unload();
}
RageVector3 RadianToDegree(RageVector3 radian)
{
// This is more accurate than the original SM5 implementation,
// but that raises a double-to-float mismatch warning, so this
// prevents that issue from occurring.
//
// A way to implement the original code exactly would be:
//
// RageVector3 radian = { radian.x * (180.0f / PI) };
return RageVector3(
static_cast<float>(radian.x * (180.0f / PI)),
static_cast<float>(radian.y * (180.0f / PI)),
static_cast<float>(radian.z * (180.0f / PI))
);
}
void AnimatedTexture::LoadBlank()
{
AnimatedTextureState state(