Index: src/core/Sk2x.h |
diff --git a/src/core/Sk2x.h b/src/core/Sk2x.h |
index 910476efd7ea75dfbdc1d8a136fcc8dc55b75cad..e9576ded997bacf054cac1e7a8122a0e99497073 100644 |
--- a/src/core/Sk2x.h |
+++ b/src/core/Sk2x.h |
@@ -58,6 +58,9 @@ public: |
Sk2x& operator -=(const Sk2x& o) { return (*this = *this - o); } |
Sk2x& operator *=(const Sk2x& o) { return (*this = *this * o); } |
+ Sk2x negate() const { return Sk2x(0) - *this; } |
+ Sk2x operator -() const { return this->negate(); } |
+ |
Sk2x rsqrt() const; // Approximate 1/this->sqrt(). |
Sk2x sqrt() const; // this->multiply(this->rsqrt()) may be faster, but less precise. |