fix vertex rounding direction

avinationmerge
UbitUmarov 2012-12-02 05:02:33 +00:00 committed by Melanie
parent aa00308b10
commit f21d990820
1 changed files with 8 additions and 1 deletions

View File

@ -207,7 +207,14 @@ namespace OpenSim.Region.Physics.Meshing
private float fRound(float f)
{
int i = (int)(1e5f * f +0.5f);
int i;
if (f == 0f)
return f;
else if (f > 0f)
i = (int)(1e5f * f + 0.5f);
else
i = (int)(1e5f * f - 0.5f);
return ((float)i * 1e-5f);
}