mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Avoid calling std::abs and divsd instruction in CSGCell::distance
This commit is contained in:
parent
5c4d954930
commit
c704ae5ac1
1 changed files with 1 additions and 1 deletions
|
|
@ -514,7 +514,7 @@ CSGCell::distance(Position r, Direction u, int32_t on_surface, Particle* p) cons
|
|||
|
||||
// Check if this distance is the new minimum.
|
||||
if (d < min_dist) {
|
||||
if (std::abs(d - min_dist) / min_dist >= FP_PRECISION) {
|
||||
if (min_dist - d >= FP_PRECISION*min_dist) {
|
||||
min_dist = d;
|
||||
i_surf = -token;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue