fixed style

This commit is contained in:
2025-05-03 20:38:58 +03:00
parent df6d75e554
commit b5e788385d
11 changed files with 34 additions and 31 deletions

View File

@@ -42,6 +42,7 @@ namespace omath::collision
return ray.end;
const auto q = t.cross(side_a);
// ReSharper disable once CppTooWideScopeInitStatement
const auto v = ray_dir.dot(q) * inv_det;
if ((v < 0 && std::abs(v) > k_epsilon) || (u + v > 1 && std::abs(u + v - 1) > k_epsilon))

View File

@@ -27,7 +27,7 @@ namespace omath::iw_engine
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.AspectRatio(),
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::iw_engine

View File

@@ -27,7 +27,7 @@ namespace omath::opengl_engine
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.AspectRatio(),
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::opengl_engine

View File

@@ -29,7 +29,7 @@ namespace omath::source_engine
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.AspectRatio(),
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::source_engine

View File

@@ -21,7 +21,7 @@ namespace omath::unity_engine
}
Mat4X4 Camera::calc_projection_matrix() const
{
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.AspectRatio(),
return calc_perspective_projection_matrix(m_field_of_view.as_degrees(), m_view_port.aspect_ratio(),
m_near_plane_distance, m_far_plane_distance);
}
} // namespace omath::unity_engine

View File

@@ -38,13 +38,13 @@ namespace omath::pathfinding
return path;
}
auto Astar::get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
const Vector3<float>& endVertex)
const Vector3<float>& end_vertex)
{
return std::ranges::min_element(open_list,
[&endVertex](const auto& a, const auto& b)
[&end_vertex](const auto& a, const auto& b)
{
const float fa = a.second.g_cost + a.first.distance_to(endVertex);
const float fb = b.second.g_cost + b.first.distance_to(endVertex);
const float fa = a.second.g_cost + a.first.distance_to(end_vertex);
const float fb = b.second.g_cost + b.first.distance_to(end_vertex);
return fa < fb;
});
}
@@ -86,6 +86,7 @@ namespace omath::pathfinding
const float tentative_g_cost = current_node.g_cost + neighbor.distance_to(current);
// ReSharper disable once CppTooWideScopeInitStatement
const auto open_it = open_list.find(neighbor);
if (open_it == open_list.end() || tentative_g_cost < open_it->second.g_cost)