double applyScaleFactor ( int scale , int value ) { return ( ( scale == 0 ) || ( scale == 255 ) || ( value == 0 ) ) ? value : value * Math . pow ( 10 , - scale ) ; }
Apply scale factor to value return a double result .