瀏覽代碼

Added unary negation to F32x4x2 and F32x4x3.

David Piuva 3 年之前
父節點
當前提交
72ef9a1f6d
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Source/DFPSR/base/simd3D.h

+ 6 - 0
Source/DFPSR/base/simd3D.h

@@ -78,6 +78,9 @@ inline F32x4x3 operator-(const F32x4x3 &left, const F32x4 &right) {
 inline F32x4x3 operator-(const F32x4x3 &left, const float &right) {
 inline F32x4x3 operator-(const F32x4x3 &left, const float &right) {
 	return F32x4x3(left.v1 - right, left.v2 - right, left.v3 - right);
 	return F32x4x3(left.v1 - right, left.v2 - right, left.v3 - right);
 }
 }
+inline F32x4x3 operator-(const F32x4x3& value) {
+	return F32x4x3(-value.v1, -value.v2, -value.v3);
+}
 
 
 inline F32x4x3 operator*(const F32x4x3 &left, const F32x4x3 &right) {
 inline F32x4x3 operator*(const F32x4x3 &left, const F32x4x3 &right) {
 	return F32x4x3(left.v1 * right.v1, left.v2 * right.v2, left.v3 * right.v3);
 	return F32x4x3(left.v1 * right.v1, left.v2 * right.v2, left.v3 * right.v3);
@@ -150,6 +153,9 @@ inline F32x4x2 operator-(const F32x4x2 &left, const F32x4 &right) {
 inline F32x4x2 operator-(const F32x4x2 &left, const float &right) {
 inline F32x4x2 operator-(const F32x4x2 &left, const float &right) {
 	return F32x4x2(left.v1 - right, left.v2 - right);
 	return F32x4x2(left.v1 - right, left.v2 - right);
 }
 }
+inline F32x4x2 operator-(const F32x4x2& value) {
+	return F32x4x2(-value.v1, -value.v2);
+}
 
 
 inline F32x4x2 operator*(const F32x4x2 &left, const F32x4x2 &right) {
 inline F32x4x2 operator*(const F32x4x2 &left, const F32x4x2 &right) {
 	return F32x4x2(left.v1 * right.v1, left.v2 * right.v2);
 	return F32x4x2(left.v1 * right.v1, left.v2 * right.v2);