mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
Merge branch 'min_n_colors' into 'master'
fix min color width to 1 (prevent div by 0) See merge request ngsolve/netgen!608
This commit is contained in:
commit
9593615da7
@ -904,7 +904,7 @@ namespace netgen
|
||||
data.Append(cf);
|
||||
}
|
||||
int n = data.Size()/4;
|
||||
colors.width = min2(n, 1024);
|
||||
colors.width = max2(1,min2(n, 1024));
|
||||
colors.height = (n+colors.width-1)/colors.width;
|
||||
for([[maybe_unused]] auto i: Range(n, colors.width*colors.height))
|
||||
data.Append({0.0f, 0.0f, 0.0f, 0.0f});
|
||||
|
Loading…
Reference in New Issue
Block a user