diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-06-28 15:43:43 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-06-28 15:49:36 +0200 |
commit | 06aaf8471b1185e5c132068feb9bede797c5ded0 (patch) | |
tree | ccca00de9687a01988fe2892699852c6790ed536 /tdescreensaver/kdesavers/vec3.cpp | |
parent | b99cb353e5a83bd2a06c457933e7552a8ac6a2eb (diff) | |
download | tdeartwork-06aaf8471b1185e5c132068feb9bede797c5ded0.tar.gz tdeartwork-06aaf8471b1185e5c132068feb9bede797c5ded0.zip |
Fix FTBFS with clang
[taken from NetBSD kdeartwork3 patches]
(cherry picked from commit 23c3263f1b2b48b729f3877e93abcd9788d7893f)
Diffstat (limited to 'tdescreensaver/kdesavers/vec3.cpp')
-rw-r--r-- | tdescreensaver/kdesavers/vec3.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tdescreensaver/kdesavers/vec3.cpp b/tdescreensaver/kdesavers/vec3.cpp index c66730e5..1715937e 100644 --- a/tdescreensaver/kdesavers/vec3.cpp +++ b/tdescreensaver/kdesavers/vec3.cpp @@ -59,7 +59,9 @@ vec3<T>& vec3<T>::rotate(const vec3<T>& r) // part of vector which is parallel to r vec3<T> par(r*(*this)/(r*r) * r); // part of vector which is perpendicular to r - vec3<T> perp(*this - par); + vec3<T> perp(*this); + std::valarray<T> &perp_ = perp; + perp -= std::valarray<T>(par); // rotation direction, size of perp vec3<T> rotdir(norm(perp) * normalized(crossprod(r,perp))); *this = par + cos(phi)*perp + sin(phi)*rotdir; |