title: How can I rotate a line segment around its center by 90 degrees?
body: <p>Since I'm really bad with math and don't understand a word of <a href="http://mathworld.wolfram.com/RotationMatrix.html" rel="nofollow noreferrer">this paper on the topic</a>, and <a href="https://stackoverflow.com/a/35685178/5536767">this answer I found</a> doesn't explain it clearly enough for me, could someone show me the algorithm, in pseudo-code, for rotating a line segment, say charted at (50,40) - (50,120) around its center point (by 90 degrees)? Would really appreciate it.</p>