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

Add 64-bit versions of core power of 2 functions

This commit is contained in:
Aaron Franke
2025-05-19 09:53:53 -07:00
parent 64b09905c7
commit f6f1df7d73
25 changed files with 161 additions and 124 deletions

View File

@@ -226,8 +226,8 @@ void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_re
real_t best_aspect = 1e20;
for (int i = 0; i < results.size(); i++) {
real_t h = next_power_of_2(results[i].max_h);
real_t w = next_power_of_2(results[i].max_w);
real_t h = next_power_of_2((uint32_t)results[i].max_h);
real_t w = next_power_of_2((uint32_t)results[i].max_w);
real_t aspect = h > w ? h / w : w / h;
if (aspect < best_aspect) {
best = i;