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)