mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
idek
remove s18+ storm effect, fix teams on all versions, fix a crash, fix 1.11 restarting
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include "Quat.h"
|
||||
#include "Vector.h"
|
||||
|
||||
#include "UnrealMathUtility.h"
|
||||
|
||||
struct FRotator
|
||||
{
|
||||
float Pitch;
|
||||
@@ -12,4 +14,35 @@ struct FRotator
|
||||
FQuat Quaternion();
|
||||
|
||||
FVector Vector() const;
|
||||
};
|
||||
|
||||
static float NormalizeAxis(float Angle);
|
||||
static float ClampAxis(float Angle);
|
||||
};
|
||||
|
||||
FORCEINLINE float FRotator::ClampAxis(float Angle)
|
||||
{
|
||||
// returns Angle in the range (-360,360)
|
||||
Angle = FMath::Fmod(Angle, 360.f);
|
||||
|
||||
if (Angle < 0.f)
|
||||
{
|
||||
// shift to [0,360) range
|
||||
Angle += 360.f;
|
||||
}
|
||||
|
||||
return Angle;
|
||||
}
|
||||
|
||||
FORCEINLINE float FRotator::NormalizeAxis(float Angle)
|
||||
{
|
||||
// returns Angle in the range [0,360)
|
||||
Angle = ClampAxis(Angle);
|
||||
|
||||
if (Angle > 180.f)
|
||||
{
|
||||
// shift to (-180,180]
|
||||
Angle -= 360.f;
|
||||
}
|
||||
|
||||
return Angle;
|
||||
}
|
||||
Reference in New Issue
Block a user