From e70595d5f7118bcbd90a87205c818b05beacb569 Mon Sep 17 00:00:00 2001 From: Thomas Toulorge <thomas.toulorge@mines-paristech.fr> Date: Sat, 27 Sep 2014 01:23:39 +0000 Subject: [PATCH] Added unary minus operator to SVector3 --- Geo/SVector3.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Geo/SVector3.h b/Geo/SVector3.h index 815752dc12..532389c796 100644 --- a/Geo/SVector3.h +++ b/Geo/SVector3.h @@ -128,6 +128,9 @@ inline SVector3 operator+(const SVector3 &a,const SVector3 &b) inline SVector3 operator-(const SVector3 &a,const SVector3 &b) { return SVector3(a[0] - b[0], a[1] - b[1], a[2] - b[2]); } +inline SVector3 operator-(const SVector3 &a) +{ return SVector3(-a[0], -a[1], -a[2]); } + inline void buildOrthoBasis_naive(SVector3 &dir, SVector3 &dir1, SVector3 &dir2) { -- GitLab