-
Notifications
You must be signed in to change notification settings - Fork 58
Description
I think overloading a function for integral and floating point types and having the meaning of the function largely change based on that overload is a recipe for disaster. Reading t.step(a/b), it is not clear what the code does without knowing the types of both a and b. Especially in c++ with our glorious implicit type conversions, seemingly innocent changes can break the library.
More generally, I think this library could be largely improved by not trying to track time via both integral variables and a floating point percentage. I'm guessing there is some underlying benefit to this design that I do not know without inspecting internals, but it has caused me to make several errors.
Finally, I would update the manual code snippet tween.step(dt);, as dt is not a percentage.