2
0
Branimir Karadžić 10 жил өмнө
parent
commit
82bb83de0a
1 өөрчлөгдсөн 21 нэмэгдсэн , 0 устгасан
  1. 21 0
      include/bx/fpumath.h

+ 21 - 0
include/bx/fpumath.h

@@ -235,6 +235,27 @@ namespace bx
 		return len;
 	}
 
+	inline void vec3Min(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
+	{
+		_result[0] = fmin(_a[0], _b[0]);
+		_result[1] = fmin(_a[1], _b[1]);
+		_result[2] = fmin(_a[2], _b[2]);
+	}
+
+	inline void vec3Max(float* __restrict _result, const float* __restrict _a, const float* __restrict _b)
+	{
+		_result[0] = fmax(_a[0], _b[0]);
+		_result[1] = fmax(_a[1], _b[1]);
+		_result[2] = fmax(_a[2], _b[2]);
+	}
+
+	inline void vec3Rcp(float* __restrict _result, const float* __restrict _a)
+	{
+		_result[0] = 1.0f / _a[0];
+		_result[1] = 1.0f / _a[1];
+		_result[2] = 1.0f / _a[2];
+	}
+
 	inline void quatIdentity(float* _result)
 	{
 		_result[0] = 0.0f;