mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 20:45:35 -04:00
idiomatic thresholding
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
This commit is contained in:
parent
62859d39ba
commit
5c4144d520
1 changed files with 3 additions and 3 deletions
|
|
@ -1436,9 +1436,9 @@ void ProjectionPlot::create_output() const
|
|||
if (i * i + j * j < wireframe_thickness_ * wireframe_thickness_) {
|
||||
|
||||
// Check if wireframe pixel is out of bounds
|
||||
if (horiz + i >= 0 && horiz + i < pixels_[0] && vert + j >= 0 &&
|
||||
vert + j < pixels_[1])
|
||||
data(horiz + i, vert + j) = wireframe_color_;
|
||||
int w_i = std::max(std::min(horiz + i, pixels_[0]), 0);
|
||||
int w_j = std::max(std::min(vert + j, pixels_[1]), 0);
|
||||
data(i, j) = wireframe_color_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue