From c2f362a10178a88f4f253c7b7f52babf73bb09ad Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Mon, 25 May 2020 20:30:58 -0700 Subject: [PATCH] Clean up line endings for vector_algebra.py See https://github.com/jensengroup/propka-3.1/issues/43 --- propka/vector_algebra.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/propka/vector_algebra.py b/propka/vector_algebra.py index 8d874b5..cfa48a9 100644 --- a/propka/vector_algebra.py +++ b/propka/vector_algebra.py @@ -48,9 +48,12 @@ class Vector: return self.x * other.x + self.y * other.y + self.z * other.z elif isinstance(other, Matrix4x4): return Vector( - xi=other.a11*self.x + other.a12*self.y + other.a13*self.z + other.a14*1.0, - yi=other.a21*self.x + other.a22*self.y + other.a23*self.z + other.a24*1.0, - zi=other.a31*self.x + other.a32*self.y + other.a33*self.z + other.a34*1.0 + xi=other.a11*self.x + other.a12*self.y + other.a13*self.z + + other.a14*1.0, + yi=other.a21*self.x + other.a22*self.y + other.a23*self.z + + other.a24*1.0, + zi=other.a31*self.x + other.a32*self.y + other.a33*self.z + + other.a34*1.0 ) elif type(other) in [int, float]: return Vector(self.x * other, self.y * other, self.z * other) @@ -405,8 +408,7 @@ def rotate_multi_vector_around_an_axis(theta, axis, vec): raise 'Incompatible keys in rotate MultiVector' res = MultiVector() for i, key in enumerate(vec.keys): - res.vectors.append(rotate_vector_around_an_axis(theta, - axis.vectors[i], - vec.vectors[i])) + res.vectors.append(rotate_vector_around_an_axis( + theta, axis.vectors[i], vec.vectors[i])) res.keys.append(key) return res