2025-04-16 01:58:29 +01:00

19 lines
368 B
C++

#pragma once
#include <concepts>
namespace kuiper
{
namespace maths
{
template<typename T, typename V>
requires(std::floating_point<V> || std::integral<V>) && std::floating_point<T>
constexpr inline T aspect_ratio(V width, V height) {
return static_cast<T>(width) / static_cast<T>(height);
}
} // namespace maths
} // namespace kuiper