Closed vanzomerenc closed 1 year ago
Is this a new bug in 0.5.0?
It looks like it isn't new. I've tried it with version 0.4 and have the same problem, and it looks like that function hasn't been changed in 5 years.
It doesn't appear to affect anything else within the library, because the only places where a vector is specified, that vector is already perpendicular to the plane.
This is with MathNet.Spatial 0.5.0 beta 4.
Plane.Project(Point, UnitVector3D) projects the point in the direction of the given vector, but does not project it onto the given plane.
Here is an example which fails:
And here is a version of Project which passes, though I don't know if it's the most efficient or numerically stable way to do it: