Merge branch 'terencehill/vec2_optimizations' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qc
index fd46288c6779420d09f9d9e62d9b032c7ef16696..f6469a58b429dbbb1c7bff6f0b1702f4f6d45273 100644 (file)
@@ -109,10 +109,7 @@ vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspe
                rows = ceil(item_count/columns);
        }
 
-       if(vertical)
-               return eX * best_rows + eY * best_columns;
-       else
-               return eX * best_columns + eY * best_rows;
+       return (vertical) ? vec2(best_rows, best_columns) : vec2(best_columns, best_rows);
 }
 
 /*