Skip to content

Commit

Permalink
round the value before change its type
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyaristio committed Feb 21, 2025
1 parent bb8f698 commit a0e5d99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kratos/utilities/geometry_utilities/brep_trimming_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,11 @@ namespace Kratos
{
Clipper2Lib::Point64 int_point;

int_point.x = static_cast<cInt>(x / factor);
int_point.y = static_cast<cInt>(y / factor);
double temp_x = std::round(x / factor);
double temp_y = std::round(y / factor);

int_point.x = static_cast<cInt>(temp_x);
int_point.y = static_cast<cInt>(temp_y);

return int_point;
}
Expand Down

0 comments on commit a0e5d99

Please sign in to comment.