We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be52a7 commit 49ad3d8Copy full SHA for 49ad3d8
src/core/modules/mathlib/mathlib.h
100644
100755
@@ -94,6 +94,12 @@ class VectorExt
94
vecCopy -= val;
95
return vecCopy;
96
}
97
+
98
+ static inline Vector __neg__(Vector vecCopy)
99
+ {
100
+ vecCopy.Negate();
101
+ return vecCopy;
102
+ }
103
};
104
105
src/core/modules/mathlib/mathlib_wrap.cpp
@@ -158,6 +158,8 @@ void export_vector(scope _mathlib)
158
.def("__radd__", &VectorExt::__add__)
159
.def(float() * self)
160
161
+ .def("__neg__", &VectorExt::__neg__)
162
163
.def("negate",
164
&Vector::Negate,
165
"Negates the vector."
0 commit comments