diff --git a/include/mitsuba/core/vector.h b/include/mitsuba/core/vector.h index 54364615..2b59c012 100644 --- a/include/mitsuba/core/vector.h +++ b/include/mitsuba/core/vector.h @@ -405,6 +405,10 @@ template inline T absDot(const TVector2 &v1, const TVector2 & return std::abs(dot(v1, v2)); } +template inline T det(const TVector2 &v1, const TVector2 &v2) { + return v1.x * v2.y - v1.y * v2.x; +} + template inline TVector2 normalize(const TVector2 &v) { return v / v.length(); }