summaryrefslogtreecommitdiff
path: root/vector.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-26 00:00:16 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-26 00:00:16 -0500
commit6461165f4daea01c5baa1d969ee5c726fb4c559e (patch)
tree9946c3a04f5dd62e0cc78fcd34089613d0dd0c48 /vector.hpp
parent98350b34d1826e1d6687f18c45b0fbc6a3488742 (diff)
downloadspace_wolff-6461165f4daea01c5baa1d969ee5c726fb4c559e.tar.gz
space_wolff-6461165f4daea01c5baa1d969ee5c726fb4c559e.tar.bz2
space_wolff-6461165f4daea01c5baa1d969ee5c726fb4c559e.zip
Finished fixes of new features.
Diffstat (limited to 'vector.hpp')
-rw-r--r--vector.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vector.hpp b/vector.hpp
index f642816..04a1a97 100644
--- a/vector.hpp
+++ b/vector.hpp
@@ -10,7 +10,7 @@ template <class T, int D> Vector<T, D> diff(T L, Vector<T, D> v1, Vector<T, D> v
Vector<T, D> v;
for (unsigned i = 0; i < D; i++) {
- v(i) = std::abs(mod(v1(i), L) - mod(v2(i), L));
+ v(i) = mod(std::abs(v1(i) - v2(i)), L);
if (v(i) > L / 2) {
v(i) = L - v(i);
}