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

set value calculation wrong #18

Open
fahmisdk6 opened this issue May 23, 2017 · 3 comments
Open

set value calculation wrong #18

fahmisdk6 opened this issue May 23, 2017 · 3 comments

Comments

@fahmisdk6
Copy link

Try to set value 1 of 100 will cause the view to show value 2.
or set max value 900, and the calculation of setValue is always wrong.

@fahmisdk6
Copy link
Author

Any clue to fix this issue?

@JesusM
Copy link
Owner

JesusM commented May 24, 2017

I'll investigate this as soon as possible. PRs are more than welcome btw ;)

@Redman1037
Copy link

Works fine when I comment few lines in calculateRadiansFromAngle method .

private int calculateRadiansFromAngle(float angle) {
  
float unit = (float) (angle / (2 * Math.PI));
//        if (unit < 0f) {
//            unit += 1;
//        }
       int radians = (int) ((unit * 360) - ((360 / 4) * 3));
//        if (radians < 0)
//            radians += 360;
       return radians;
   }

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

3 participants