From a849c199d970e153580c312a24cfdfa099bc7b69 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 9 Apr 2022 13:29:41 -0700 Subject: Changeset: 4 More work on editor --- source/Utils.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/Utils.hpp') diff --git a/source/Utils.hpp b/source/Utils.hpp index 3d04e62..03fdfed 100644 --- a/source/Utils.hpp +++ b/source/Utils.hpp @@ -14,4 +14,8 @@ enum IoMode { FILE* OpenCstdioFile(const std::filesystem::path& path, IoMode mode, bool binary = false); FILE* OpenCstdioFile(const char* path, IoMode mode, bool binary = false); +constexpr float Abs(float v) noexcept { + return v < 0.0f ? -v : v; +} + } // namespace Utils -- cgit v1.2.3-70-g09d2