flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:36:47 -05:00
commit 0807c0286a
107 changed files with 12310 additions and 0 deletions

24
tjp/core/math/clamp.hpp Executable file
View File

@@ -0,0 +1,24 @@
//
// Math.hpp
// amoeba
//
// Created by Timothy Prepscius on 12/30/16.
// Copyright © 2016 Timothy Prepscius. All rights reserved.
//
#pragma once
namespace tjp::core::math {
template<typename V, typename L, typename R>
inline V clamp(const V &v, const L &l, const R &r)
{
if (v < l)
return (V)l;
if (v > r)
return (V)r;
return v;
}
} // namespace