summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-07 07:16:16 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-07 07:16:16 +0100
commitfa308025b7b9805ae72327be65faf4be8d1964c5 (patch)
tree70a20aa13a33878a4e5c48c64bdd735613861824 /opentrack
parent604c4e9399559909e2d7a805a728297dc0561ddf (diff)
no need use temp array anymore
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/tracker.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index 344cfcbb..acdeb945 100644
--- a/opentrack/tracker.cpp
+++ b/opentrack/tracker.cpp
@@ -94,8 +94,7 @@ static dmat<3, 3> euler_to_rmat(const double* input)
void Tracker::t_compensate(const dmat<3, 3>& rmat, const double* xyz, double* output, bool rz)
{
static constexpr int p_x = 2, p_y = 0, p_z = 1;
- const double xyz_[3] = { -xyz[p_x], -xyz[p_y], xyz[p_z] };
- dmat<3, 1> tvec(xyz_);
+ dmat<3, 1> tvec({-xyz[p_x], -xyz[p_y], xyz[p_z]});
const dmat<3, 1> ret = rmat * tvec;
output[0] = -ret(p_x, 0);
output[1] = -ret(p_y, 0);