-
Notifications
You must be signed in to change notification settings - Fork 9
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
Variables added to prototype in inherit call #406
Comments
Also, curvatureTemp looks like: curvatureTemp: { r: 1, x: 0, y: 0 }, Are the initial values important? |
curvatureTemp and curvatureTemp2 are not instance variables and should not be moved to the constructor--it seems they should be moved closer to this line: // Reuse empty object for creating SkaterStates to avoid allocations
var EMPTY_OBJECT = {}; Since they have similar intent. The initial values are not important--these |
Thanks, I understand now. Sounds good. |
This was done in ESP, closing this issue. |
From #398 -
I noticed that the curvatureTemp2 and cuvatureTemp are used to track cuvature of the track at the skater's location. They are added to the prototype in the inherit call of EnergySkateParkBasicsModel.js. I haven't seen variables declared here before. @samreid is there an allocation benefit of defining these variables here? Could they be moved to the constructor?
The text was updated successfully, but these errors were encountered: