On the topic of groovy math, here’s some smooth algebra.
Given 3 points, are these points collinear?
Collinear means the points will all be on the same line. If this is the case, then all the points would satisfy an equation y=mx+b. If they are all on the same line, then they will all have the same slope (m) and same y-intercept (b).
For example: Given points (1,-1), (3,3) and (0,3)
m=change in y/change in x
m= (-1-3)/(1-3)= -4/-2=2
Plug points in to see if they fit the equation.
Since (0,3) does not satisfy the equation, then the three given points are not collinear.