From 38f2402d2d2f62663bff162dabb70f02c7d89755 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 13 Jun 2021 10:41:45 +0300 Subject: [PATCH] - added `TVector2<>` constructor from `float*` As we seem to do not like explicit constructors, this will make temporary `TVector3<>` object creation much less probable --- src/common/utility/vectors.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/utility/vectors.h b/src/common/utility/vectors.h index e8c39fc28..2118a22fa 100644 --- a/src/common/utility/vectors.h +++ b/src/common/utility/vectors.h @@ -82,6 +82,11 @@ struct TVector2 { } + TVector2(vec_t *o) + : X(o[0]), Y(o[1]) + { + } + void Zero() { Y = X = 0;