Skip to content

Commit

Permalink
Merge pull request #248 from GSharker/dev/guma/curve-split-extension-…
Browse files Browse the repository at this point in the history
…methods

Remove ToDos
  • Loading branch information
sonomirco authored Aug 18, 2021
2 parents b26f878 + f6fd396 commit 62808d2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/GShark/ExtendedMethods/Curve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ public static List<ICurve> SplitAt(this ICurve curve, double t)
/// <param name="curve">The curve to split.</param>
/// <param name="parameters">The parameters at which to split the curve. Values should be between 0 and 1.</param>
/// <returns>Collection of curve segments.</returns>
//TODO: Should input parameters be between 0 and 1, or should we have a normalization function on ICurve?
public static List<ICurve> SplitAt(this ICurve curve, double[] parameters)
{
var curves = new List<ICurve>();
Expand All @@ -174,10 +173,8 @@ public static List<ICurve> SplitAt(this ICurve curve, double[] parameters)
return curves;
}

//TODO: sort in increasing order or throw if not?
var sortedParameters = parameters.OrderBy(x => x).ToArray();

//TODO: Always including ends of domain if not included. Could also just ignore and assume they are in input parameters.
if (Math.Abs(sortedParameters[0] - curve.Domain.T0) > GeoSharkMath.MaxTolerance)
{
var tempParams = new double[sortedParameters.Length + 1];
Expand Down

0 comments on commit 62808d2

Please sign in to comment.