Using animationSpeed as the variable name misguides as it feels that increasing the integer value would increase the speed. However as it's being used inside duration, we have to decrease the integer value to increase the speed of animation.
Proposal: Refactor animationSpeed to animationDuration and also change the datatype from int to Duration
Using
animationSpeed
as the variable name misguides as it feels that increasing the integer value would increase the speed. However as it's being used inside duration, we have to decrease the integer value to increase the speed of animation.Proposal: Refactor
animationSpeed
toanimationDuration
and also change the datatype fromint
toDuration