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

scale(x,0) has unexpected behaviour #52

Closed
original001 opened this issue May 23, 2018 · 1 comment
Closed

scale(x,0) has unexpected behaviour #52

original001 opened this issue May 23, 2018 · 1 comment
Labels

Comments

@original001
Copy link

test case:
var scaled = new Vector(10, 10).scale(1, 0)

expected behaviour
scaled === (10,0)

actual behaviour
scaled === (10,10)

I found out that reason is implicitly type infer in method scale

this['y'] = y || x;

I wanted to make PR, but don't know, how you build your SAT.min.js file

@jriecken jriecken added the bug label May 24, 2018
jriecken added a commit that referenced this issue May 24, 2018
Check explicitly for undefined y param when scaling. Fixes #52
@jriecken
Copy link
Owner

Thanks, I've fixed it and released 0.7.1 of the sat package.

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

2 participants