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

Solid constraints only work for positive functions #58

Open
winstliu opened this issue Jul 26, 2016 · 0 comments
Open

Solid constraints only work for positive functions #58

winstliu opened this issue Jul 26, 2016 · 0 comments
Labels

Comments

@winstliu
Copy link
Collaborator

winstliu commented Jul 26, 2016

On line 320 there's this if statement: if(this.equation1.getCoord(i) <= size). It's meant to stop rendering the solid if it goes outside the 28x28 graph size. However this obviously doesn't work for negative functions. A simple fix (such as the one I committed yesterday for a similar bug) would be if(math.abs(this.equation1.getCoord(i)) <= size), though after testing that out I realized that this method provides slight inconsistencies. The correct way would be to do something like the bounds over-extending where the size is modified.

Negative (without "fix"):
negative-without-fix

Negative (with "fix"):
negative-with-fix

Positive:
positive

@winstliu winstliu added the bug label Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant