I'm using OpenFL and I'm attempting to use this code I found...
pos.sortOn("cotangent", Array.NUMERIC | Array.DESCENDING);
...but I'm getting the error:
src/Main.hx:180: characters 2-12 : Array<{ yPoint : Float, xPoint : Float, cotangent : Float }> has no field sortOn
src/Main.hx:180: characters 26-39 : Class<Array> has no field NUMERIC
src/Main.hx:180: characters 42-58 : Class<Array> has no field DESCENDING
Now according to this 'sortOn' is an available method for AS3 arrays so what is the problem?
In Haxe you could use ArraySort. Something like here