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

Initial negative numbers dragging crush #39

Open
GoogleCodeExporter opened this issue Oct 30, 2015 · 2 comments
Open

Initial negative numbers dragging crush #39

GoogleCodeExporter opened this issue Oct 30, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Set up an initial number negative 
2. The implied step code will get to NaN since it uses a logarithm
3. When you drag the number it will get to NaN

I solved it making the absolute number before the logarithm.


Original issue reported on code.google.com by [email protected] on 17 Jun 2013 at 1:42

@GoogleCodeExporter
Copy link
Author

See issue 23

Original comment by [email protected] on 16 Jul 2014 at 9:55

@GoogleCodeExporter
Copy link
Author

Like this...
706: // Hey Doug, check this out.
707: this.__impliedStep = Math.pow(10, 
Math.floor(Math.log(Math.abs(this.initialValue))/Math.LN10))/10;

Also fixes problem where -0.1 initial value displays as zero.


Original comment by [email protected] on 16 Jul 2014 at 10:02

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

1 participant