Skip to content
Snippets Groups Projects
Commit f1334f09 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

Proper rounding when doing integer compression for floats

parent bd3b4595
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ namespace{
std::vector<int>& int_vec, Real factor) {
int_vec.resize(real_vec.size());
for(uint i = 0; i < real_vec.size(); ++i) {
int_vec[i] = factor*real_vec[i];
int_vec[i] = std::round(factor*real_vec[i]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment