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

Type error in ScaleExponents.cs #32

Open
Ramarren opened this issue Jan 24, 2015 · 0 comments
Open

Type error in ScaleExponents.cs #32

Ramarren opened this issue Jan 24, 2015 · 0 comments

Comments

@Ramarren
Copy link

Math.Pow has a result of type double. In line 218:

v[i] = (float)v2[i] * Math.Pow(factor.relative.linear, exponent);

it propagates to the multiplication, and causes an Argument Exception, since v[i] is of type float in this branch.
The line should be:

v[i] = (float)((float)v2[i] * Math.Pow(factor.relative.linear, exponent));
Ramarren added a commit to Ramarren/Firespitter that referenced this issue Jan 25, 2015
This creates a proper prefab necessary for Tweakscale to work correctly

Resource types changed to double to workaround Biotronic/TweakScale#32
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