Chapter 2 Challenge 3 Code Question

Please bear with me if I use any incorrect terminology. Iā€™m a 41 year old guy trying to teach myself. Thank you! :grin:

When I did Challenge 3 in Chapter 2, I used the following in the rotate function:

let shortest = shortestAngleBetween(angle1: sprite.zRotation, angle2: direction.angle)

The solution provided used this:

let shortest = shortestAngleBetween(angle1: sprite.zRotation, angle2: velocity.angle)

Everything else I coded was the same and both worked the same. So my question is:

Why did the solution use velocity.angle instead of direction.angle?