Haxe implementation of a 2d vector