From 582a4212e54a0028738aeaa22d1518e455f49990 Mon Sep 17 00:00:00 2001 From: Luke Shingles Date: Sun, 1 Sep 2024 17:04:16 +0100 Subject: [PATCH] Update vectors.h --- vectors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vectors.h b/vectors.h index 5486046b4..af0f557ec 100644 --- a/vectors.h +++ b/vectors.h @@ -16,7 +16,7 @@ // return the the magnitude of a vector template -[[nodiscard]] [[gnu::const]] constexpr auto vec_len(const std::array vec) -> double { +[[nodiscard]] constexpr auto vec_len(const std::array &vec) -> double { const double squaredlen = std::accumulate(vec.begin(), vec.end(), 0., [](auto a, auto b) { return a + b * b; }); return std::sqrt(squaredlen);