From f01405c0a76447d94187a5eeb8506dbc28aed7e7 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 4 Jan 2021 15:02:02 +0100 Subject: [PATCH] Convert aspect ratio to float --- inferno/src/inferno/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferno/src/inferno/window.h b/inferno/src/inferno/window.h index 22414b2..1f20634 100644 --- a/inferno/src/inferno/window.h +++ b/inferno/src/inferno/window.h @@ -36,7 +36,7 @@ namespace Inferno { bool shouldClose() const; void setShouldClose(bool close) const; - inline int getAspect() const { return m_properties.width / m_properties.height; } + inline float getAspect() const { return static_cast(m_properties.width) / static_cast(m_properties.height); } inline int getWidth() const { return m_properties.width; } inline int getHeight() const { return m_properties.height; } inline bool isVSync() const { return m_properties.vsync; }