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

ForceDescriber.forceToPullIndex function #71

Closed
jessegreenberg opened this issue Jun 28, 2019 · 1 comment
Closed

ForceDescriber.forceToPullIndex function #71

jessegreenberg opened this issue Jun 28, 2019 · 1 comment
Assignees

Comments

@jessegreenberg
Copy link
Contributor

From phetsims/gravity-force-lab-basics#156

The LinearFunction looks like

this.forceToPullIndex = new LinearFunction( model.getMinForce(), model.getMaxForce(), 0, 6, true )

Can this use the string array length?

// max uses length - 1 because we are working with array indices
this.forceToPullIndex = new LinearFunction( model.getMinForce(), model.getMaxForce(), 0, PULL_EFFORT_STRINGS.length - 1, true )
@zepumph
Copy link
Member

zepumph commented Jul 2, 2019

That's a really nice improvement thanks.

@zepumph zepumph closed this as completed Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants