I have an equation (o+t*d)dot(o+t*d)=r^2 where o is a ray's three dimensional origin, t is a scaler variable representing a ray's distance, d is a ray's three dimensional direction, r is a sphere's radius, and dot is the dot product. How can I solve for t? Please list the steps as well as the answer.