Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: implement 2D point and move

  • Implement a function using a struct that can store x,y values representing a point.
  • Then add a function called move that accepts dx and dy the distances the point needs to move and update the location of the point.