X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry%2Fhypersphere.h;h=4df03fed0eb433abb38d6df8e9375fc42f78befe;hb=e56a892c3f505a1969b207654bcca4bb6158e01b;hp=3c0412564fcc1cf055842c9d325943935812746a;hpb=09cc3a8648dd20e9a07d669b353c4a120b67c1c4;p=libs%2Fmath.git diff --git a/source/geometry/hypersphere.h b/source/geometry/hypersphere.h index 3c04125..4df03fe 100644 --- a/source/geometry/hypersphere.h +++ b/source/geometry/hypersphere.h @@ -4,10 +4,7 @@ #include #include #include -#include "boundingbox.h" -#include "ray.h" #include "shape.h" -#include "surfacepoint.h" namespace Msp { namespace Geometry { @@ -73,7 +70,7 @@ inline unsigned HyperSphere::get_intersections(const Ray &ray, Surfa T mid = -inner_product(ray.get_direction(), ray.get_start()); LinAl::Vector nearest = ray.get_start()+ray.get_direction()*mid; T offset_sq = radius*radius-inner_product(nearest, nearest); - if(offset_sq<0) + if(offset_sq