Skip to content

Commit 8f47e28

Browse files
Antoine Fontainenecessarily-equal
authored andcommitted
Deprecate AngleMod
It's a duplicate for AngleNormalize360, and the later is better documented. Let's keep only one.
1 parent a50b9ba commit 8f47e28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/engine/qcommon/q_math.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,9 @@ void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 )
634634
v3[ 2 ] = AngleSubtract( v1[ 2 ], v2[ 2 ] );
635635
}
636636

637-
float AngleMod( float a )
637+
DEPRECATED float AngleMod( float a )
638638
{
639-
return ( ( 360.0f / 65536 ) * ( ( int )( a * ( 65536 / 360.0f ) ) & 65535 ) );
639+
return AngleNormalize360( a );
640640
}
641641

642642
/*

src/engine/qcommon/q_shared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ inline vec_t VectorNormalize2( const vec3_t v, vec3_t out )
759759
void SetPlaneSignbits( struct cplane_t *out );
760760
int BoxOnPlaneSide( const vec3_t emins, const vec3_t emaxs, const struct cplane_t *plane );
761761

762-
float AngleMod( float a );
762+
DEPRECATED float AngleMod( float a );
763763
float LerpAngle( float from, float to, float frac );
764764
float AngleSubtract( float a1, float a2 );
765765
void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 );

0 commit comments

Comments
 (0)