Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/qcommon/q_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ signed short ClampShort( int i ) {


// this isn't a real cheap function to call!
int DirToByte( vec3_t dir ) {
int DirToByte( const vec3_t dir ) {
int i, best;
float d, bestd;

Expand Down Expand Up @@ -491,7 +491,7 @@ void MakeNormalVectors( const vec3_t forward, vec3_t right, vec3_t up) {
}


void VectorRotate( vec3_t in, vec3_t matrix[3], vec3_t out )
void VectorRotate( const vec3_t in, vec3_t matrix[3], vec3_t out )
{
out[0] = DotProduct( in, matrix[0] );
out[1] = DotProduct( in, matrix[1] );
Expand Down Expand Up @@ -572,7 +572,7 @@ float AngleSubtract( float a1, float a2 ) {
}


void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 ) {
void AnglesSubtract( const vec3_t v1, const vec3_t v2, vec3_t v3 ) {
v3[0] = AngleSubtract( v1[0], v2[0] );
v3[1] = AngleSubtract( v1[1], v2[1] );
v3[2] = AngleSubtract( v1[2], v2[2] );
Expand Down Expand Up @@ -654,7 +654,7 @@ BoxOnPlaneSide
Returns 1, 2, or 1 + 2
==================
*/
int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *p)
int BoxOnPlaneSide(const vec3_t emins, const vec3_t emaxs, const struct cplane_s *p)
{
float dist[2];
int sides, b, i;
Expand Down
8 changes: 4 additions & 4 deletions code/qcommon/q_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ signed char ClampChar( int i );
signed short ClampShort( int i );

// this isn't a real cheap function to call!
int DirToByte( vec3_t dir );
int DirToByte( const vec3_t dir );
void ByteToDir( int b, vec3_t dir );

#if 1
Expand Down Expand Up @@ -665,7 +665,7 @@ void CrossProduct( const vec3_t v1, const vec3_t v2, vec3_t cross );
vec_t VectorNormalize (vec3_t v); // returns vector length
vec_t VectorNormalize2( const vec3_t v, vec3_t out );
void Vector4Scale( const vec4_t in, vec_t scale, vec4_t out );
void VectorRotate( vec3_t in, vec3_t matrix[3], vec3_t out );
void VectorRotate( const vec3_t in, vec3_t matrix[3], vec3_t out );
int Q_log2(int val);

float Q_acos(float c);
Expand All @@ -684,7 +684,7 @@ void AxisClear( vec3_t axis[3] );
void AxisCopy( vec3_t in[3], vec3_t out[3] );

void SetPlaneSignbits( struct cplane_s *out );
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *plane);
int BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, const struct cplane_s *plane);

qboolean BoundsIntersect(const vec3_t mins, const vec3_t maxs,
const vec3_t mins2, const vec3_t maxs2);
Expand All @@ -696,7 +696,7 @@ qboolean BoundsIntersectPoint(const vec3_t mins, const vec3_t maxs,
float AngleMod(float a);
float LerpAngle (float from, float to, float frac);
float AngleSubtract( float a1, float a2 );
void AnglesSubtract( vec3_t v1, vec3_t v2, vec3_t v3 );
void AnglesSubtract( const vec3_t v1, const vec3_t v2, vec3_t v3 );

float AngleNormalize360 ( float angle );
float AngleNormalize180 ( float angle );
Expand Down
Loading