I've found a bunch of answers to determining which side a point lays between a line, but only in 2D.
Here's an existing question of what I want, but it 2D: How to tell whether a point is to the right or left side of a line
How do I adapt the formula below that is currently only taking into account the X, Y positions, to also take into account the Z axis? Assuming the view point is top-down.
position = sign((Bx - Ax) * (Y - Ay) - (By - Ay) * (X - Ax))