Commit 74a1541a authored by Tobias WEBER's avatar Tobias WEBER

more bugfixes

parent 67235967
......@@ -3768,8 +3768,10 @@ requires is_vec<t_vec> && is_mat<t_mat>
for(std::size_t i=0; i<newatom.size(); ++i)
{
newatom[i] = std::fmod(newatom[i], 1.);
while(newatom[i] < -0.5) newatom[i] += 1.;
while(newatom[i] >= 0.5) newatom[i] -= 1.;
if(newatom[i] < -0.5)
newatom[i] += std::abs(std::floor(newatom[i]));
if(newatom[i] >= 0.5)
newatom[i] -= std::abs(std::ceil(newatom[i]));
}
}
......
......@@ -2027,8 +2027,8 @@ void MagStructFactDlg::PickerIntersection(const t_vec3_gl* pos, std::size_t objI
t_vec r = m::create<t_vec>({0,0,0});
std::istringstream{itemX->text().toStdString()} >> r[0];
std::istringstream{itemX->text().toStdString()} >> r[1];
std::istringstream{itemX->text().toStdString()} >> r[2];
std::istringstream{itemY->text().toStdString()} >> r[1];
std::istringstream{itemZ->text().toStdString()} >> r[2];
t_vec rlab = m_crystA * r;
std::ostringstream ostr; ostr.precision(g_prec);
......
......@@ -1382,8 +1382,8 @@ void StructFactDlg::PickerIntersection(const t_vec3_gl* pos, std::size_t objIdx,
t_vec r = m::create<t_vec>({0,0,0});
std::istringstream{itemX->text().toStdString()} >> r[0];
std::istringstream{itemX->text().toStdString()} >> r[1];
std::istringstream{itemX->text().toStdString()} >> r[2];
std::istringstream{itemY->text().toStdString()} >> r[1];
std::istringstream{itemZ->text().toStdString()} >> r[2];
t_vec rlab = m_crystA * r;
std::ostringstream ostr; ostr.precision(g_prec);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment