Skip to content

Commit

Permalink
Fix numeric conversion error
Browse files Browse the repository at this point in the history
  • Loading branch information
tobre1 committed Jan 7, 2025
1 parent 790fe44 commit 50ac174
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/viennaps/models/psSF6O2Etching.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,7 @@ class SF6O2Ion
assert(primID < localData.getVectorData(0).size() && "id out of bounds");

const double cosTheta = -DotProduct(rayDir, geomNormal);
NumericType angle =
std::acos(std::max(std::min(cosTheta, static_cast<NumericType>(1.)),
static_cast<NumericType>(0.)));
NumericType angle = std::acos(std::max(std::min(cosTheta, 1.), 0.));

assert(cosTheta >= 0 && "Hit backside of disc");
assert(cosTheta <= 1 + 1e6 && "Error in calculating cos theta");
Expand Down

0 comments on commit 50ac174

Please sign in to comment.