From 389a45bf9e9dcf60e747178a728d12e62deef46e Mon Sep 17 00:00:00 2001 From: Irlan Date: Fri, 10 May 2019 10:50:28 -0300 Subject: [PATCH] Add negate operator --- include/bounce/cloth/dense_vec3.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/bounce/cloth/dense_vec3.h b/include/bounce/cloth/dense_vec3.h index 78a5b52..ffc4e42 100644 --- a/include/bounce/cloth/dense_vec3.h +++ b/include/bounce/cloth/dense_vec3.h @@ -171,4 +171,11 @@ inline b3DenseVec3 operator*(float32 a, const b3DenseVec3& b) return result; } +inline b3DenseVec3 operator-(const b3DenseVec3& v) +{ + b3DenseVec3 result(v.n); + b3Negate(result, v); + return result; +} + #endif \ No newline at end of file