/bin/std/flash/geom/Point.hx

http://github.com/Yoomee/clippy · Haxe · 27 lines · 20 code · 7 blank · 0 comment · 0 complexity · fbf64f3f304cb8f72d370b8a93447ecf MD5 · raw file

  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. }