blurstudio / TwistSpline

A smoothly reparameterizing Bezier spline that also interpolates orientations
MIT License
96 stars 43 forks source link

Question of potential code-mistake #20

Closed ivogrig closed 3 years ago

ivogrig commented 3 years ago

https://github.com/blurstudio/TwistSpline/blob/master/twistSpline.h#L164

In the multiLinearIndexes function the argument "samp" is not used, Should this line rather be that? (I did read that this function is obsolete or unused but it came up as a compilation error)

if (!capped && t >= samp[segIdx + 1]) {

Some compilers seem to also complain about the redundant qualifier in this line: https://github.com/blurstudio/TwistSpline/blob/master/twistSplineNode.h#L123

Best, Ivo

tbttfox commented 3 years ago

Yep. Looks like you're right in both cases.

Looks like I've just never called multiLinearIndices, so it didn't show up as a bug for me. And VS didn't flag it. And the redundant qualifier is an easy fix.

Thanks for finding those!