AS3 Convert a Percentage to a Value


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.