windows fix

This commit is contained in:
2026-05-18 10:34:23 +03:00
parent 36a7865b29
commit 23d3b7c9f5
2 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -107,7 +107,8 @@ namespace omath::projection
// m[1,1] == 1 / tan(fov/2) => fov = 2 * atan(1 / m[1,1])
const auto f = proj_matrix.at(1, 1);
// m[0,0] == m[1,1] / aspect_ratio => aspect = m[1,1] / m[0,0]
return {FieldOfView::from_radians(NumericType{2} * std::atan(NumericType{1} / f)),
const auto fov_radians = NumericType{2} * std::atan(NumericType{1} / f);
return {FieldOfView::from_radians(static_cast<typename FieldOfView::ArithmeticType>(fov_radians)),
f / proj_matrix.at(0, 0)};
}