HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.93k stars 427 forks source link

Calculate adjustedLerp only when necessary #3106

Closed richTrash21 closed 2 months ago

richTrash21 commented 2 months ago

Since followLerp bound between 0 and 1 in updateLerp, let lerp be adjusted only when bound value < 1

Geokureli commented 2 months ago

I don't understand the concern, is it really worth increasing code complexity to avoid a Math.pow call once per update?

Edit: Nvm, I guess this isn't really more complex