HoloCircleSeekBar icon indicating copy to clipboard operation
HoloCircleSeekBar copied to clipboard

set value calculation wrong

Open fahmisdk6 opened this issue 7 years ago • 3 comments

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 avatar May 23 '17 06:05 fahmisdk6

Any clue to fix this issue?

fahmisdk6 avatar May 23 '17 08:05 fahmisdk6

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

JesusM avatar May 24 '17 12:05 JesusM

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;
   }

Redman1037 avatar Jun 25 '19 08:06 Redman1037