The cross product of two parallel direction vectors has zero length. The magnitude (length) of the cross product is the area enclosed by the vectors. Two parallel direction vectors obviously do not have a surface since they can be considered the same origin.
In 2D the z axis is the normal to the x and y axis. The z-axis is calculated by using the cross vector of both vectors.
The cross vector Z-component can be calculated using:
if is very small, the vectors are parallel.