question: private static float snapPercent ( float percent ) { int value = ( int ) ( percent * 100 ) ; int slope = 2 ; if ( Math . abs ( value - 25 ) <= slope ) { value = 25 ; } if ( Math . abs ( value - 33 ) <= slope ) { value = 33 ; } if ( Math . abs ( value - 50 ) <= slope ) { value = 50 ; } if ( Math . abs ( value - 66 ) <= slope ) { value = 66 ; } if ( Math . abs ( value - 75 ) <= slope ) { value = 75 ; } return ( value / 100f ) ; }
target:  Snap the percent value to common values