public bool IsParallel(Line line) { Vector firstLineDirectionVector = GetDirectionVector(); Vector secondLineDirectionVector = line.GetDirectionVector(); firstLineDirectionVector.Normalize(secondLineDirectionVector.GetLength()); if (!(firstLineDirectionVector - secondLineDirectionVector).IsZeroVector()) { firstLineDirectionVector = firstLineDirectionVector * (-1.0); } Vector difference = firstLineDirectionVector - secondLineDirectionVector; return(difference.IsZeroVector()); }