Update readme to fix clamped floating point issue #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just for anyone who ran into this issue, I was using the docs as a reference for this package (which is nice + simple to use with clear explanation + diagrams, thanks!) and ran into the issue that I was using a clamped knot vector to force the first/last curve points to exactly match the control points, BUT initially the final control point wasn't actually being included when I used the iteration loop as per the docs.
Turns out it's because the doc example was incrementing by 0.01 in the interpolation loop, but because of the numeric representation in JS, adding 0.01 100 times does NOT result in 1 ! (it's like 0.999). Because of this the last point (which would have been when t === 1) was not actually being hit.
For anyone that runs into this issue, just interpolate across an integer range (like 0 < t <= 100) and then /100 for the bspline funcs.
Hope that helps someone :)