DEV Community

Discussion on: A JavaScript interview question asked at Facebook

 
richardeschloss profile image
Richard Schloss

I updated to include 3d, and also to account for when the animation ends, in case it's desired to chain the animation calls. I still prefer to directly set the parameters instead of performing the multiply operation (which can be a lot of multiply-add operations, and a potential source rounding errors if floating points are used).