How to rotate a dashed line in 8steps of like 45 degrees until it covers 360 degrees using C++ programming language. | SoloLearn: Learn to code for FREE!

0

How to rotate a dashed line in 8steps of like 45 degrees until it covers 360 degrees using C++ programming language.

Rotation

4/28/2020 7:15:12 PM

Josphat Mwangi

2 Answers

New Answer

+1

You mean like this? First step: | Next step: / Next step: - Next step: \ Next step: |

+1

There are two things that can be done: 1. You can fix the line at a point and change coordinates of it accordingly. 2. Use the rotation matrix to show rotation up to any limit. (Rotation matrix R={cosA, -sinA, sinA, cosA})