From 9d86def5ac72b03ebb69fcd82236cd77445b2ccf Mon Sep 17 00:00:00 2001 From: chatlanin Date: Thu, 24 Mar 2022 17:36:15 +0300 Subject: [PATCH] add const --- src/math/vector.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/math/vector.hpp b/src/math/vector.hpp index 1ae40d0..b596cce 100644 --- a/src/math/vector.hpp +++ b/src/math/vector.hpp @@ -41,23 +41,23 @@ namespace hack public: value_t get_value() { return value_; }; - auto x() + auto x() const { return std::get<0>(value_); } - auto y() + auto y() const { return std::get<1>(value_); } - auto z() + auto z() const { if (std::tuple_size{} < 3) throw std::out_of_range("You try get no valid vector date!"); return std::get<2>(value_); } - auto w() + auto w() const { if (std::tuple_size{} < 4) throw std::out_of_range("You try get no valid vector date!"); return std::get<3>(value_);