Vector2D class missing

I’m using OpenFL for a while now, and I really miss one quite importat think - Vector2D class. There are some better or worse implementation out there but most of them sucks to be honest. Shouldn’t be there a coherent solution for this in OpenFL? I’m using hxmath for this right now, but it’s quite slow and it misses a lot of stuff. The only good thing about it’s Vector2 implementation is, that it has overloded operators like + - * etc.
Do I miss anything important in this topic?

The Flash API does not include a Vector2D type, however, we are going to be using OpenFL over the top of Lime, which expands our options for adding to the available APIs. Lime does have a “lime.math.Vector2” type, so perhaps we could put some of the valuable functions in that class, and backport it to Lime legacy so it’s available on all targets in the time being

Yes. I know that Flash also lacks of it. I couldnt understand it also… In my opinion it should be added to OpenFL api long time ago. If it’s about Lime’s implementation it doesnt cover operators reloading, so even adding vectors is painfull, and it’s api really lacks of lots of usefull stuff…

Right, I’m saying it’s a place where could look at adding things, and perhaps Vector2 should be an abstract, although actually, Haxe abstracts don’t allow for data storage, so that could be an issue.

I’m saying that I would prefer to innovate more on a Lime level in regards to new and useful APIs, while OpenFL provides consistency with Flash, if that makes sense (Lime will be, and can be, fully available to OpenFL projects, so it’s accessible to your code either way)

I see your point, and you seem to be right. And yes - it’s a problem if it’s about abstracts and operators in Haxe :confused: hxmath is just full of static functions that have to create new objects again and again, that’s why it’s quite slow - but that’s a price.

But wait a sec… Isnt openfl._geom.point just a copy of lime’s Vector2 - so as other openfl.geom. classes?

Right now, the openfl.geom.Point and lime.math.Vector2 types are similar, but they don’t inherit from one another, so there’s room for them to evolve differently

hxmath is being updated right now, it’s a bit more usable now - more operators reloaded, some new functions and so on.