private float findPercentage(float value,float startRange,float endRange){
  value=ScGauge.valueRangeLimit(value,startRange,endRange);
  if (endRange - startRange == 0.0f) {
    return 0.0f;
  }
 else {
    return ((value - startRange) / (endRange - startRange)) * 100.0f;
  }
}

private float findPercentage ( float value , float startRange , float endRange ) { value = ScGauge . valueRangeLimit ( value , startRange , endRange ) ; if ( endRange - startRange == 0.0f ) { return 0.0f ; } else { return ( ( value - startRange ) / ( endRange - startRange ) ) * 100.0f ; } }
find the value percentage respect range of values .
