1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Core: Replace C math headers with C++ equivalents

- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
This commit is contained in:
Thaddeus Crews
2025-03-19 14:18:09 -05:00
parent c5c1cd4440
commit ad40939b6f
101 changed files with 414 additions and 498 deletions

View File

@@ -925,8 +925,8 @@ static Vector2 compute_polyline_edge_offset_clamped(const Vector2 &p_segment_dir
bisector = (p_prev_segment_dir * p_segment_dir.length() - p_segment_dir * p_prev_segment_dir.length()).normalized();
float angle = atan2f(bisector.cross(p_prev_segment_dir), bisector.dot(p_prev_segment_dir));
float sin_angle = sinf(angle);
float angle = std::atan2(bisector.cross(p_prev_segment_dir), bisector.dot(p_prev_segment_dir));
float sin_angle = std::sin(angle);
if (!Math::is_zero_approx(sin_angle) && !p_segment_dir.is_equal_approx(p_prev_segment_dir)) {
length = 1.0f / sin_angle;