From 31f73b6f44f3deac749af41e84435f5bc9b037f2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 21 Mar 2024 20:09:34 +0000 Subject: Make arc_length a member function --- lib/maths.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/maths.h') diff --git a/lib/maths.h b/lib/maths.h index ce18b3f..20a397b 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -19,6 +19,12 @@ struct Arc : public std::pair { { return i ? second : first; } + + [[nodiscard]] constexpr inline float + length() const + { + return second - first; + } }; constexpr const RelativePosition3D up {0, 0, 1}; @@ -171,12 +177,6 @@ operator%=(glm::vec & p, const glm::mat & mutation) return p = p % mutation; } -constexpr inline float -arc_length(const Arc & arc) -{ - return arc.second - arc.first; -} - float normalize(float ang); template -- cgit v1.2.3