Skip to content

Commit

Permalink
Merge pull request #217 from ChrisClems/master
Browse files Browse the repository at this point in the history
Floating point precision comparison fix in BSpline.cs
  • Loading branch information
dsn27 authored Jan 14, 2025
2 parents 1175600 + 5d669e5 commit 7acffce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CADability/BSpline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2032,8 +2032,8 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
/// <returns>The resulting point</returns>
public GeoPoint PointAtParam(double param)
{
if (param == knots[0]) return poles[0];
if (param == knots[knots.Length - 1]) return poles[poles.Length - 1];
if (Math.Abs(param - knots[0]) < Precision.eps) return poles[0];
if (Math.Abs(param - knots[knots.Length - 1]) < Precision.eps) return poles[poles.Length - 1];
lock (this)
{
if (!nurbsHelper) MakeNurbsHelper();
Expand Down

0 comments on commit 7acffce

Please sign in to comment.