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

Wrong sample code for fastsin2 in Tutorial 4 of 5? #30

Open
CounterMatter opened this issue Sep 21, 2024 · 0 comments
Open

Wrong sample code for fastsin2 in Tutorial 4 of 5? #30

CounterMatter opened this issue Sep 21, 2024 · 0 comments

Comments

@CounterMatter
Copy link

I really like this tool, so I was playing around with making a GUI for it (e.g. to easily see the error graph). I was working through the tutorials in the wiki section, and I noticed that Tutorial 4 of 5 (https://github.com/samhocevar/lolremez/wiki/Tutorial-4-of-5:-fixing-lower-order-parameters) includes this code:

float fastsin2(float x)
{
    return x + x * f(x * x);
}

Graphing that doesn't giving me the correct results. I worked through the math, and I believe the code should be updated to:

float fastsin2(float x)
{
    return x + x * x * x * f(x * x);
}

(It was missing a factor of x^2.)

Am I overlooking something?

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

1 participant