Point.hx 679 B

123456789101112131415161718192021222324252627
  1. package flash.geom;
  2. #if !flash8
  3. "This class is only accesible in Flash8"
  4. #end
  5. extern class Point<T> {
  6. var x : T;
  7. var y : T;
  8. var length : Float;
  9. function new( x : T, y : T ) : Void;
  10. function normalize( length : T ) : Void;
  11. function add( p : Point<T> ) : Point<T>;
  12. function subtract( p : Point<T> ) : Point<T>;
  13. function equals( p : Point<T> ) : Bool;
  14. function offset( dx : T, dy : T ) : Void;
  15. function clone() : Point<T>;
  16. function toString() : String;
  17. static function distance<T>( p1 : Point<T>, p2 : Point<T> ) : T;
  18. static function interpolate<T>( p1 : Point<T>, p2 : Point<T>, f : T ) : Point<T>;
  19. static function polar<T>( dist : T, angle : T ) : Point<T>;
  20. }