godot/thirdparty/msdfgen/core/arithmetics.hpp


#pragma once

#include <cmath>
#include "base.h"

namespace msdfgen {

/// Returns the smaller of the arguments.
template <typename T>
inline T min(T a, T b) {}

/// Returns the larger of the arguments.
template <typename T>
inline T max(T a, T b) {}

/// Returns the middle out of three values
template <typename T>
inline T median(T a, T b, T c) {}

/// Returns the weighted average of a and b.
template <typename T, typename S>
inline T mix(T a, T b, S weight) {}

/// Clamps the number to the interval from 0 to 1.
template <typename T>
inline T clamp(T n) {}

/// Clamps the number to the interval from 0 to b.
template <typename T>
inline T clamp(T n, T b) {}

/// Clamps the number to the interval from a to b.
template <typename T>
inline T clamp(T n, T a, T b) {}

/// Returns 1 for positive values, -1 for negative values, and 0 for zero.
template <typename T>
inline int sign(T n) {}

/// Returns 1 for non-negative values and -1 for negative values.
template <typename T>
inline int nonZeroSign(T n) {}

}