All checks were successful
Build (Arch Linux) / build (push) Successful in 3m10s
19 lines
368 B
C++
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
|