Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cubic interpolation bug #18

Closed
zirik opened this issue May 12, 2019 · 1 comment
Closed

Cubic interpolation bug #18

zirik opened this issue May 12, 2019 · 1 comment

Comments

@zirik
Copy link

zirik commented May 12, 2019

I was getting weird results from the Curve module so I went digging through the code.
This is the return statement from the CubicInterp function in the original libnoise:
return p * a * a * a + q * a * a + r * a + s;
And this is the return statement from the Cubic method of NoiseMath in SharpNoise:
return (p * a * a * a) + (q * a * a * a) + (r * a) + s;
It seems q is being multiplied by a one too many times. Removing the extra multiplication fixed the issues I was having.

@rthome rthome closed this as completed in 63af829 May 12, 2019
@rthome
Copy link
Owner

rthome commented May 12, 2019

Thanks - this will be fixed in the next release. Whenever that is...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants