home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / zombietypocalypse.swf / scripts / classes / mathematical / Point3D.as
Encoding:
Text File  |  2008-09-15  |  1.2 KB  |  57 lines

  1. package classes.mathematical
  2. {
  3.    public class Point3D
  4.    {
  5.        
  6.       
  7.       private var y:Number;
  8.       
  9.       private var z:Number;
  10.       
  11.       private var x:Number;
  12.       
  13.       public function Point3D(param1:Number, param2:Number, param3:Number)
  14.       {
  15.          super();
  16.          this.x = param1;
  17.          this.y = param2;
  18.          this.z = param3;
  19.       }
  20.       
  21.       public static function getDistance(param1:Point3D, param2:Point3D) : Number
  22.       {
  23.          return Math.sqrt(Math.pow(param1.X - param2.X,2) + Math.pow(param1.Y - param2.Y,2) + Math.pow(param1.Z - param2.Z,2));
  24.       }
  25.       
  26.       public function get Y() : Number
  27.       {
  28.          return this.y;
  29.       }
  30.       
  31.       public function get Z() : Number
  32.       {
  33.          return this.z;
  34.       }
  35.       
  36.       public function set Y(param1:Number) : void
  37.       {
  38.          this.y = param1;
  39.       }
  40.       
  41.       public function set X(param1:Number) : void
  42.       {
  43.          this.x = param1;
  44.       }
  45.       
  46.       public function get X() : Number
  47.       {
  48.          return this.x;
  49.       }
  50.       
  51.       public function set Z(param1:Number) : void
  52.       {
  53.          this.z = param1;
  54.       }
  55.    }
  56. }
  57.