From 065f070fe90aee08a7d572bcc28f411bb344d093 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 24 Feb 2019 14:11:15 -0800 Subject: BasicMath: added Vector4->Vector3 implicit conversion --- Common/interface/BasicMath.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Common/interface') diff --git a/Common/interface/BasicMath.h b/Common/interface/BasicMath.h index 49f3e3e9..6fb52af9 100644 --- a/Common/interface/BasicMath.h +++ b/Common/interface/BasicMath.h @@ -558,6 +558,11 @@ template struct Vector4 Vector4() : x(0), y(0), z(0), w(0) { } Vector4(T _x, T _y, T _z, T _w) : x(_x), y(_y), z(_z), w(_w) { } + + operator Vector3() const + { + return Vector3(x, y, z); + } }; -- cgit v1.2.3