Closed tiagolr closed 8 years ago
wouldn't you use v + v * 2? isnt that the point of the abstract?
Nico
On Sat, Sep 19, 2015 at 5:48 AM, TiagoLr notifications@github.com wrote:
Using Vec type (instead of Vector) and have access to operations like : v = v1 + v2, would be very useful to implement simple linear movement formulas like:
p += v * dt + a * dt * dt / 2; v += a * dt;
The problem is that the haxe compiler complains about using Vector methods:
var v:Vec = new Vec(0,0); v.add(v * 2);
results in : luxe.Vec has no field add (Suggestion: _add)
Any thoughts on this? Can this feature be added, or am i using the abstract class wrongly?
— Reply to this email directly or view it on GitHub https://github.com/underscorediscovery/luxe/issues/326.
This could be fixed using @:forward
to expose functions of the underlying Vector class. Gotta see why that wasn't done yet, otherwise that could be added.
Using Vec type (instead of Vector) and have access to operations like : v = v1 + v2, would be very useful to implement simple linear movement formulas like:
The problem is that the haxe compiler complains about using Vector methods:
results in :
luxe.Vec has no field add (Suggestion: _add)
Any thoughts on this? Can this feature be added, or am i using the abstract class wrongly?