mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add closest_power_of_2 func and implement mix_rate/latency on OS X
This commit is contained in:
@@ -1076,8 +1076,8 @@ void Geometry::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_resu
|
||||
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
|
||||
float h = nearest_power_of_2(results[i].max_h);
|
||||
float w = nearest_power_of_2(results[i].max_w);
|
||||
float h = next_power_of_2(results[i].max_h);
|
||||
float w = next_power_of_2(results[i].max_w);
|
||||
float aspect = h > w ? h / w : w / h;
|
||||
if (aspect < best_aspect) {
|
||||
best = i;
|
||||
|
||||
Reference in New Issue
Block a user