You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This if guard erroneously guarantees that the body's speed property is not set to zero when the body stops.
if (this.position.x !== this.prev.x || this.position.y !== this.prev.y)
guards the setting of the speed and angle properties. This was probably intended to avoid bugs when setting the angle property but should not guard the speed-setting line.
Suggest that the speed-setting line be moved out of the if statement.
The text was updated successfully, but these errors were encountered:
This if guard erroneously guarantees that the body's
speed
property is not set to zero when the body stops.if (this.position.x !== this.prev.x || this.position.y !== this.prev.y)
guards the setting of the
speed
andangle
properties. This was probably intended to avoid bugs when setting theangle
property but should not guard the speed-setting line.Suggest that the speed-setting line be moved out of the if statement.
The text was updated successfully, but these errors were encountered: