Skip to content

Commit 4484b73

Browse files
committed
Merge branch 'master' of github.com:vincefn/objcryst into upstream-objcryst
* 'master' of github.com:vincefn/objcryst: Correct precision for Crystal::GetFormula()
2 parents 946f37f + f9ff112 commit 4484b73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ObjCryst/ObjCryst/Crystal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ std::string Crystal::GetFormula() const
409409
{
410410
if(pos!=velts.begin()) s<<" ";
411411
float nb=pos->second;
412-
if((abs(nb)-nb)<0.01) s<<pos->first<<int(round(nb));
412+
if(abs(round(nb)-nb)<0.005) s<<pos->first<<int(round(nb));
413413
else s<<pos->first<<nb;
414414
}
415415
return s.str();
416416
}
417-
417+
418418

419419
REAL Crystal::GetWeight() const
420420
{

0 commit comments

Comments
 (0)