Skip to content

Commit

Permalink
Removing review comment, doesn't seem practical to mutate Ball positi…
Browse files Browse the repository at this point in the history
…ons given the storage
  • Loading branch information
jonathanolson committed Sep 29, 2020
1 parent 19dad09 commit 2bd6be5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions js/common/model/Ball.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ class Ball {

// Since velocity is the first derivative of position, and the ball isn't accelerating, we can solely multiply
// the velocity by the delta-time to get the displacement.
//REVIEW: for GC, consider reusing Vector2 instances or just mutate them. Will require inspection of what we do with
//REVIEW: positions, and whether it's possible.
this.position = this.velocity.times( dt ).add( this.position );
}

Expand Down

0 comments on commit 2bd6be5

Please sign in to comment.