Skip to content

Commit

Permalink
Created a final variable for the touch factors size
Browse files Browse the repository at this point in the history
  • Loading branch information
Exikle committed Aug 7, 2014
1 parent 3dd3c17 commit de3f785
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .idea/libraries/support_annotations_20_0_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/libraries/support_v4_20_0_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ public class WheelView extends View {
private static final int BOTTOM_MASK = 0x08;

private static final int NEVER_USED = 0;
private static final int SIZE_VAL = 20;

//The following code is used to avoid sqrt operations during touch drag events
private static final float TOUCH_DRAG_COEFFICIENT = 0.8f;
private static final float[] TOUCH_FACTORS;

static {
int size = 20;
int size = SIZE_VAL;
TOUCH_FACTORS = new float[size];
int maxIndex = size - 1;
float numerator = size * size;
Expand Down

0 comments on commit de3f785

Please sign in to comment.