Posted By

adrianparr on 11/07/09


Tagged

Value percent percentage


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

foodlove


AS3 Convert a Percentage to a Value


 / Published in: ActionScript 3
 

  1. private function percentToValue($percent:Number, $min:Number, $max:Number):Number {
  2. var myValue:Number;
  3. var difference:Number = $max - $min;
  4. myValue = (difference * $percent) + $min;
  5. return myValue;
  6. }

Report this snippet  

You need to login to post a comment.