mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-20 22:52:51 +08:00
found one bug in the previous ++ changes
This commit is contained in:
parent
89f468671d
commit
e3a8431a4a
@ -67,7 +67,7 @@ struct CommaInitializer
|
|||||||
ei_assert(m_col<m_matrix.cols()
|
ei_assert(m_col<m_matrix.cols()
|
||||||
&& "Too many coefficients passed to comma initializer (operator<<)");
|
&& "Too many coefficients passed to comma initializer (operator<<)");
|
||||||
ei_assert(m_currentBlockRows==1);
|
ei_assert(m_currentBlockRows==1);
|
||||||
m_matrix.coeffRef(m_row, ++m_col) = s;
|
m_matrix.coeffRef(m_row, m_col++) = s;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ template<> inline float ei_random(float a, float b)
|
|||||||
int i;
|
int i;
|
||||||
do { i = ei_random<int>(256*int(a),256*int(b));
|
do { i = ei_random<int>(256*int(a),256*int(b));
|
||||||
} while(i==0);
|
} while(i==0);
|
||||||
return i/256.f;
|
return float(i)/256.f;
|
||||||
#else
|
#else
|
||||||
return a + (b-a) * float(std::rand()) / float(RAND_MAX);
|
return a + (b-a) * float(std::rand()) / float(RAND_MAX);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user