ezdxf
ezdxf copied to clipboard
Error in math.distance_point_line_2d
ezdxf.math.distance_point_line_2d shows following error when I use it.
"ezdxf\math\construct2d.py", line 333, in distance_point_line_2d
return math.fabs((start - point).det(end - point)) / (end - start).magnitude
AttributeError: 'Vector' object has no attribute 'det'
Is this function called by ezdxf or by yourself, it is a bug if it is called by ezdxf and i need more context to fix it. It is a type error if it is called by yourself use Vec2() as input as the function signature says.
This is a low level function, so I don't do extra type checking here, Python is already slow enough.
Sorry, I found out my mistake. I have put vector (not vec2) directory into this function.