public static double[] RayPlaneParametric(Ray3 ray, Plane3 plane, double tol = MathUtil.Epsilon) { Vector3 u = ray.Direction; Vector3 w = ray.Position - plane.Origo; double d = plane.Normal.Dot(u); double n = -plane.Normal.Dot(w); if (Math.Abs(d) < tol) { return(empty_array); //parallel } return(RealArray(n / d)); }