From a91b4bb4c8df5c50a4abe95c090de31cfe375e88 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: Mon, 4 Feb 2019 21:40:03 -0800 Subject: [PATCH] Cleanup. --- examples/29-debugdraw/debugdraw.cpp | 2 +- examples/common/bounds.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/29-debugdraw/debugdraw.cpp b/examples/29-debugdraw/debugdraw.cpp index 09da5499d..529eb522a 100644 --- a/examples/29-debugdraw/debugdraw.cpp +++ b/examples/29-debugdraw/debugdraw.cpp @@ -844,7 +844,7 @@ public: Cylinder cylinder = { { -10.0f, 1.0f, 10.0f }, - { 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f }, 1.0f }; diff --git a/examples/common/bounds.cpp b/examples/common/bounds.cpp index 6eb1efe5e..1d25de871 100644 --- a/examples/common/bounds.cpp +++ b/examples/common/bounds.cpp @@ -1029,7 +1029,7 @@ Vec3 closestPoint(const LineSegment& _line, const Vec3& _point) const Vec3 axis = sub(_line.end, _line.pos); const float lengthSq = dot(axis, axis); const float tt = clamp(projectToAxis(axis, sub(_point, _line.pos) ) / lengthSq, 0.0f, 1.0f); - return mad(axis, { tt, tt, tt }, _line.pos); + return mad(axis, tt, _line.pos); } Vec3 closestPoint(const Plane& _plane, const Vec3& _point) @@ -1065,7 +1065,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, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}) ); + return cartesian(_triangle, clamp(uvw, 0.0f, 1.0f) ); } bool overlap(const Sphere& _sphere, const Vec3& _pos)