Asked • 03/27/19

Rotate a Triangle around its center with JavaScript?

I'm trying to draw an equilateral triangle on a canvas, and then rotate it around its center by 90 degrees once you click the triangle, but for some reason I'm having trouble determining it's center point. How would you go about doing this in Javascript?

1 Expert Answer

By:

Ian M. answered • 03/27/19

Tutor
5.0 (2,509)

JavaScript, Web Application Engineer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.