1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-06-07 16:47:44 +00:00

fixed upper

This commit is contained in:
AriAvery 2019-02-01 15:05:37 +01:00
parent c8bdb6d59d
commit 135cb3682a
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ uint8_t Sapphire::Util::floatToUInt8Rot( float val )
return static_cast< uint8_t >( 0x80 * ( ( val + PI ) ) / PI ); return static_cast< uint8_t >( 0x80 * ( ( val + PI ) ) / PI );
} }
float Sapphire::Util::RelativeAngle( float heading, float x1, float y1, float x2, float y2 ) float Sapphire::Util::relativeAngle( float heading, float x1, float y1, float x2, float y2 )
{ {
float angle = ( (float)atan2( y2 - y1, x2 - x1 ) * ( 180.0 / PI ) ); float angle = ( (float)atan2( y2 - y1, x2 - x1 ) * ( 180.0 / PI ) );
float value = angle - heading; float value = angle - heading;

View file

@ -27,7 +27,7 @@ namespace Sapphire::Util
uint8_t floatToUInt8Rot( float val ); uint8_t floatToUInt8Rot( float val );
float RelativeAngle( float heading, float x1, float y1, float x2, float y2 ); float relativeAngle( float heading, float x1, float y1, float x2, float y2 );
template < typename T > template < typename T >
T clamp( T val, T minimum, T maximum ) T clamp( T val, T minimum, T maximum )