public static double3 point(ray_d r, double distance) { return(r.origin + distance * r.direction); }
public static bool equal(ray_d r0, ray_d r1) { return(all(equal(r0.origin, r1.origin) & equal(r0.direction, r1.direction))); }
public ray(ray_d r) { origin = r.origin.toFloat3(); direction = r.direction.toFloat3(); }