-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rename currentAmplitudeProperty #130
Comments
Adding @arouinfar to this, because this would be a huge change. It's the foundation of the Hollywood model, appears in model.md and in the PhET-iO API. |
@samreid said:
Can you help me grok the typo in this sentence? Can you point me to a case where we've used [-1,1] as the range for a percentage? Values expressed as percentages are in the range [0,100] throughout this sim. That range was used rather than [0,1] to accommodate PhET-iO, so that Property values correspond to the % values shown in the UI. |
The documentation, referenced in the top comment, says:
Normally a percentage goes from 0% to 100%, so perhaps "percentage" is inaccurate in this context. Perhaps my typo was to say "like" instead of "are". |
Documentation revised in Coil.ts and model.md, which purges the word "percentage" and hopefully clarifies the semantics of the value. Now we need to decide whether we need to change the name. // This is a quantity that PhET made up. It is a value in the range [-1,1]. The magnitude describes the amount of
// current relative to some maximum current in the model. The sign indicates the direction of that current. View
// components can use this value to determine how they should behave -- eg, how far to move a voltmeter needle,
// how bright to make a light bulb, and how fast to move electrons.
public readonly currentAmplitudeProperty: TReadOnlyProperty<number>; |
@arouinfar @samreid How about |
That is an improvement, but I wonder what you think of a more general term like |
We'd also like to remove the word "current", to avoid misconceptions like #118. There is no computation of current in this model, and no modeling of resistance. @arouinfar and I like |
While we have no current or resistance in the model, we unfortuately have things that are named |
When renaming to |
Yes - anything named "current amplitude" will be renamed accordingly. |
I'm starting to like |
@arouinfar ready for your review. I changed to
|
Looks good, thanks @pixelzoom. |
During code review #103 we observed this code in Coil.ts:
Using a name like "amplitude" suggests that it is a non-negative number. So we recommend coming up with a new name that more closely reflects the documentation and behavior.
We also recommend adjusting the terminology "percentage" if the values like between -1 and 1.
The text was updated successfully, but these errors were encountered: