public float getPercentValue ( Pin pin ) { double value = getValue ( pin ) ; if ( value > INVALID_VALUE ) { return ( float ) ( value / ( getMaxSupportedValue ( ) - getMinSupportedValue ( ) ) ) * 100f ; } return INVALID_VALUE ; }
Get the current value in a percentage of the available range instead of a raw value .