Seems a bit odd that I have to add my own function to the b2Vec api to do this:
I mean I have to interpolate points all the time usually. I guess people are managing it with a combination of other methods - but isn't that more overhead from function calls?
Code:
public function lerp(v:b2Vec2, n:Number):b2Vec2{
return new b2Vec2(x + ((v.x - x) * n), y + ((v.y - y) * n));
}
return new b2Vec2(x + ((v.x - x) * n), y + ((v.y - y) * n));
}
I mean I have to interpolate points all the time usually. I guess people are managing it with a combination of other methods - but isn't that more overhead from function calls?