diff options
author | rtk0c <[email protected]> | 2022-04-09 13:29:41 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-09 13:29:41 -0700 |
commit | a849c199d970e153580c312a24cfdfa099bc7b69 (patch) | |
tree | 1b5faa8d40953ee451103b94349bb84c738677ee /source/Utils.hpp | |
parent | e7ef3f208c109357538b1f68af10bcd78db95c95 (diff) |
Changeset: 4 More work on editor
Diffstat (limited to 'source/Utils.hpp')
-rw-r--r-- | source/Utils.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |