You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 bya
one too many times. Removing the extra multiplication fixed the issues I was having.The text was updated successfully, but these errors were encountered: