summaryrefslogtreecommitdiff
path: root/utility/maths.h
diff options
context:
space:
mode:
Diffstat (limited to 'utility/maths.h')
-rw-r--r--utility/maths.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/utility/maths.h b/utility/maths.h
index 22688cb..31f5960 100644
--- a/utility/maths.h
+++ b/utility/maths.h
@@ -5,7 +5,15 @@
#include <glm/gtc/constants.hpp>
#include <utility>
-using Arc = std::pair<float, float>;
+struct Arc : public std::pair<float, float> {
+ using std::pair<float, float>::pair;
+
+ float
+ operator[](unsigned int i) const
+ {
+ return i ? second : first;
+ }
+};
constexpr const glm::vec3 up {0, 1, 0};
constexpr const glm::vec3 north {0, 0, 1};