kuiper-engine/include/maths/aspect_ratio.hpp
Adam Macdonald a8d8b9b9ab
All checks were successful
Build (Arch Linux) / build (push) Successful in 3m10s
initial commit
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