Skip to content

Commit

Permalink
Merge pull request #361 from GSharker/dev/ceca/infinite-curvature-fix
Browse files Browse the repository at this point in the history
infinite curvature bug fix
  • Loading branch information
sonomirco committed Sep 13, 2021
2 parents 3f5badc + 766574b commit f44fc6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GShark/Analyze/Curve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ internal static Vector3 Curvature(Vector3 derivative1, Vector3 derivative2)
double curvatureLength = curvature.Length;
if (curvatureLength < 1.490116119385E-08) // SqrtEpsilon value that is used when comparing square roots.
{
throw new Exception("Curvature is infinite.");
curvatureLength = 1e10;
}

double radius = (curvature / (curvatureLength * curvatureLength)).Length;
Expand Down

0 comments on commit f44fc6d

Please sign in to comment.