Browse Source

immutable arguments specified by const (#187)

ianmage 7 years ago
parent
commit
ccb2be0f7c
2 changed files with 4 additions and 4 deletions
  1. 2 2
      include/bx/inline/math.inl
  2. 2 2
      include/bx/math.h

+ 2 - 2
include/bx/inline/math.inl

@@ -917,7 +917,7 @@ namespace bx
 		_dst[15] =  _src[15];
 	}
 
-	inline void calcNormal(float _result[3], float _va[3], float _vb[3], float _vc[3])
+	inline void calcNormal(float _result[3], const float _va[3], const float _vb[3], const float _vc[3])
 	{
 		float ba[3];
 		vec3Sub(ba, _vb, _va);
@@ -931,7 +931,7 @@ namespace bx
 		vec3Norm(_result, baxca);
 	}
 
-	inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3])
+	inline void calcPlane(float _result[4], const float _va[3], const float _vb[3], const float _vc[3])
 	{
 		float normal[3];
 		calcNormal(normal, _va, _vb, _vc);

+ 2 - 2
include/bx/math.h

@@ -550,10 +550,10 @@ namespace bx
 	void mtxViewFlipHandedness(float* _dst, const float* _src);
 
 	///
-	void calcNormal(float _result[3], float _va[3], float _vb[3], float _vc[3]);
+	void calcNormal(float _result[3], const float _va[3], const float _vb[3], const float _vc[3]);
 
 	///
-	void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3]);
+	void calcPlane(float _result[4], const float _va[3], const float _vb[3], const float _vc[3]);
 
 	///
 	void calcLinearFit2D(float _result[2], const void* _points, uint32_t _stride, uint32_t _numPoints);