normalize_rows.cpp 394 B

12345678910111213141516
  1. #include "normalize_rows.h"
  2. template <typename DerivedV>
  3. IGL_INLINE void igl::normalize_rows(
  4. const Eigen::PlainObjectBase<DerivedV>& A,
  5. Eigen::PlainObjectBase<DerivedV> & B)
  6. {
  7. // Resize output
  8. B.resize(A.rows(),A.cols());
  9. // loop over rows
  10. for(int i = 0; i < A.rows();i++)
  11. {
  12. B.row(i) = A.row(i).normalized();
  13. }
  14. }