From 088da97531935a61870ecada10f06b9b9a8255d1 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 29 May 2021 13:01:01 -0700 Subject: Table instaciation to xlsx complete --- Size.hpp | 61 ------------------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100755 Size.hpp (limited to 'Size.hpp') diff --git a/Size.hpp b/Size.hpp deleted file mode 100755 index f737f9c..0000000 --- a/Size.hpp +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once - -#include - -template -class Size2 { -public: - T width; - T height; - -public: - Size2() - : width{ 0 }, height{ 0 } { - } - - Size2(T width, T height) - : width{ width }, height{ height } { - } - - Size2(glm::vec<2, T> vec) - : width{ vec.x }, height{ vec.y } { - } - - operator glm::vec<2, T>() const { - return { width, height }; - } - - glm::vec<2, T> AsVec() const { - return { width, height }; - } - - friend bool operator==(const Size2&, const Size2&) = default; - - template - Size2 Cast() const { - return { - static_cast(width), - static_cast(height), - }; - } -}; - -template -Size2 operator+(Size2 a, Size2 b) { - return { a.width + b.width, a.height + b.height }; -} - -template -Size2 operator-(Size2 a, Size2 b) { - return { a.width - b.width, a.height - b.height }; -} - -template -auto operator*(Size2 a, N mult) -> Size2 { - return { a.width * mult, a.height * mult }; -} - -template -auto operator/(Size2 a, N mult) -> Size2 { - return { a.width / mult, a.height / mult }; -} -- cgit v1.2.3-70-g09d2