topical media & game development

talk show tell print

#graphic-flex-image-effects-07-source-aether-utils-MathUtil.ax

#graphic-flex-image-effects-07-source-aether-utils-MathUtil.ax [swf] [flash] flex


  package aether.utils {
  
          
Class performs common Math utility functions.

  
          public class @ax-graphic-flex-image-effects-07-source-aether-utils-MathUtil {
          
                  
Converts degrees to radians.
parameter: num Number to convert.
returns: Number values in radians.

  
                  static public function degreesToRadians(num:Number):Number {
                          return num*Math.PI/180;
                  }
          
                  static public function clamp(num:Number, min:Number, max:Number):Number {
                          return Math.max(min, Math.min(num, max));
                  }
  
          }
          
  }


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.