Browse Source

Merge branch 'alecjacobson' of https://github.com/libigl/libigl into alecjacobson

Former-commit-id: fa36a49c239ebb3f864ead5d330aac24f5b0c5cf
Alec Jacobson 8 years ago
parent
commit
387916248b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/grad.cpp

+ 1 - 1
include/igl/grad.cpp

@@ -139,7 +139,7 @@ IGL_INLINE void grad_tri(const Eigen::PlainObjectBase<DerivedV>&V,
     // This does correct l2 norm of rows, so that it contains #F list of twice
     // This does correct l2 norm of rows, so that it contains #F list of twice
     // triangle areas
     // triangle areas
     double dblA = std::sqrt(n.dot(n));
     double dblA = std::sqrt(n.dot(n));
-    Eigen::Matrix<typename DerivedV::Scalar, 1, 3> u;
+    Eigen::Matrix<typename DerivedV::Scalar, 1, 3> u(0,0,1);
     if (!uniform) {
     if (!uniform) {
       // now normalize normals to get unit normals
       // now normalize normals to get unit normals
       u = n / dblA;
       u = n / dblA;