You've already forked godot
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user