Ask Your Question

Revision history [back]

There are some steps you need to follow

  1. Create a canvas and use the mouse handler to capture the points for drawing the line
  2. Use those points to calculate euclidean distance between two positions will give you the length
  3. Using trigonometry, you can calculate the corner between two points