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

Has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API #30

Open
Zymr-Gunjan opened this issue Mar 16, 2016 · 1 comment

Comments

@Zymr-Gunjan
Copy link

If there is only single point value then is not working.

@ulzii-dev
Copy link

Hi @Zymr-Gunjan ,

I fixed it, added condition on these 607, 608 lines, cause it divide by zero, then result NaN.
span == 0 ? 10 :
span == 0 ? 0 :

var step = span == 0 ? 10 : CGFloat(pow(10, floor(log(Double(span) / Double(m)) / M_LN10))) let err = span == 0 ? 0 : CGFloat(m) / span * step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants