chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-08-02 18:35:35 +02:00
parent ce2ca13815
commit 1d468ac35a
594 changed files with 16040 additions and 16536 deletions

View File

@ -4,31 +4,24 @@
template <typename T>
inline void clamp(T& current, T min, T max)
{
if (current < min)
{
if (current < min) {
current = min;
}
else if(current > max)
{
} else if (current > max) {
current = max;
}
}
// List of numbers from min to max. Next is exponent times bigger than previous.
class ExponentialSeries
{
public:
class ExponentialSeries {
public:
ExponentialSeries(unsigned min, unsigned max, unsigned exponent = 2)
{
m_current = m_min = min;
m_max = max;
m_exponent = exponent;
}
void reset()
{
m_current = m_min;
}
void reset() { m_current = m_min; }
unsigned operator()()
{
unsigned retval = m_current;