Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.30 KB | None | 0 0
  1. class Point {
  2.     public var x:Float;
  3.     public var y:Float;
  4.  
  5.     public inline function new(x:Float, y:Float) {
  6.         this.x = x;
  7.         this.y = y;
  8.     }
  9. }
  10.  
  11. class Test {
  12.     static public function main() {
  13.         // look at the "JS Source"-tab to reveal the effect
  14.         var pt = new Point(1.2, 9.3);
  15.         trace(pt.x);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement