X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgeometry%2Fray.h;h=6c9a65bf4785c38ae07ab6fc78e4a4337575200b;hb=fb9e6b5ff48e10ea2217cf539e0461956abf02cf;hp=99f447bcd62edc2a640039d1ad7ad1eea54bb8c2;hpb=63b6f5c937a2f0dcf93ef9fd1a586985c32631ce;p=libs%2Fmath.git diff --git a/source/geometry/ray.h b/source/geometry/ray.h index 99f447b..6c9a65b 100644 --- a/source/geometry/ray.h +++ b/source/geometry/ray.h @@ -30,7 +30,7 @@ template inline Ray::Ray(): limit(0) { - direction[0] = 1; + direction[0] = T(1); } template @@ -46,14 +46,14 @@ inline Ray::Ray(const LinAl::Vector &s, const LinAl::Vector &d direction(normalize(d)), limit(l) { - if(l<0) + if(l inline bool Ray::check_limits(T x) const { - return x>=0 && (!limit || x<=limit); + return x>=T(0) && (!limit || x<=limit); } } // namespace Geometry