juliansteenbakker/duration_picker

Floating Point Error Resulting in Incorrect Minutes Displayed

lhartman1 opened this issue · 0 comments

There seems to be a floating point error when the duration provided to DurationPicker's constructor is converted to a double (_turningAngle) and then back to an integer (_minuteHand(double angle)).

This can be reproduced by supplying Duration(minutes: 1) to DurationPicker's constructor and it results in 0 minutes being displayed in the widget. Also, Duration(minutes: 4) results in 3 minutes being displayed.