From 53fe0138f006fc21760504ec0f8c2d97dc029d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sun, 3 Mar 2019 15:17:09 -0800 Subject: [PATCH] Cleanup. --- examples/common/bounds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/bounds.cpp b/examples/common/bounds.cpp index ca4859dc1..74a74b715 100644 --- a/examples/common/bounds.cpp +++ b/examples/common/bounds.cpp @@ -44,7 +44,7 @@ void toAabb(Aabb& _outAabb, const Cylinder& _cylinder) const Vec3 axis = sub(_cylinder.end, _cylinder.pos); const Vec3 asq = mul(axis, axis); const Vec3 nsq = mul(asq, 1.0f/dot(axis, axis) ); - const Vec3 tmp = sub(1.0f, nsq); + const Vec3 tmp = sub(Vec3(1.0f), nsq); const float inv = 1.0f/(tmp.x*tmp.y*tmp.z); @@ -1228,7 +1228,7 @@ Vec3 closestPoint(const Triangle& _triangle, const Vec3& _point) const Vec3 pos = closestPoint(plane, _point); const Vec3 uvw = barycentric(_triangle, pos); - return cartesian(_triangle, clamp(uvw, 0.0f, 1.0f) ); + return cartesian(_triangle, clamp(uvw, Vec3(0.0f), Vec3(1.0f) ) ); } bool overlap(const Aabb& _aabb, const Vec3& _pos)