How to check if a vector goes CW or CCW around another perpendicular vector?


How to check if each segment of the spline in the image below goes CW or CCW around the Z axis ot the red point helper?

All verts lays on the XY plane of the red point. The red point represent the face normal and its Z axis has to be used to determine if an edge goes CW or CCW (around the point’s Z axis).


normal routine for this sort of thing is

fn isLeft a b p = ((b.x - a.x) * (p.y - a.y) - (p.x - a.x) * (b.y - a.y))

if it’s greater than zero then p is left of ab and so it’s CCW exactly zero then its straight (or inline with ab) otherwise CW… various ways to use it in the above situation.


Thank you.