From fdbfa8e36f85eee051fc562f1a8588970257a20f Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 6 Oct 2022 02:48:43 +0200 Subject: Rotating camera with mouse --- src/Math/MVP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Math/MVP.cpp') diff --git a/src/Math/MVP.cpp b/src/Math/MVP.cpp index 146b208..de9f2ee 100644 --- a/src/Math/MVP.cpp +++ b/src/Math/MVP.cpp @@ -19,7 +19,7 @@ Matrix<4, 4> view(Vector<3> position, Rotation angles) { } Matrix<4, 4> projection(float aspect, float fov, float near, float far) { - auto fov_radians = (fov * M_PI) / 180.0f; + auto fov_radians = Math::radians(fov); float x_scale = 1.0f / (tan(fov_radians / 2.0f) * aspect); float y_scale = 1.0f / tan(fov_radians / 2.0f); -- cgit 1.4.1