protected internal override xyz Cross(LineType ViewLine) { xyz Normal = ViewLine.Direction & ViewLine.P; if (Normal.length() < 0.000001) { return(ViewLine.Value(ViewLine.P.length() - Radius)); } Normal = (Normal & ViewLine.Direction).normalized(); double d = ViewLine.P * Normal; if (System.Math.Abs(d) > Radius) { d = Radius; } return (ViewLine.Value((-1) * (ViewLine.P * ViewLine.Direction) - System.Math.Sqrt(Radius * Radius - d * d))); }