I’m writing an activity where I need one thing to happen if students enter a vertical line (e.g., x = 3) and a different thing to happen if students enter a non-vertical line.
How can I tell if a line is vertical?
I tried using slopeOfLine(xyLine(c2input.latex)) but it turns out that the slope of something like x = 3 is “defined” as infinity, so that approach didn’t work.
The slopeOfLine function will still work, but it is deprecated as we moved things to be methods of the xyLine object to make it easy to see what’s possible by typing a . after an xyLine object.