diff options
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/UbitMeshing/Mesh.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/UbitMeshing/Mesh.cs b/OpenSim/Region/Physics/UbitMeshing/Mesh.cs index 0476b28..b67422f 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Mesh.cs +++ b/OpenSim/Region/Physics/UbitMeshing/Mesh.cs | |||
@@ -207,7 +207,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
207 | 207 | ||
208 | private float fRound(float f) | 208 | private float fRound(float f) |
209 | { | 209 | { |
210 | int i = (int)(1e5f * f +0.5f); | 210 | int i; |
211 | if (f == 0f) | ||
212 | return f; | ||
213 | else if (f > 0f) | ||
214 | i = (int)(1e5f * f + 0.5f); | ||
215 | else | ||
216 | i = (int)(1e5f * f - 0.5f); | ||
217 | |||
211 | return ((float)i * 1e-5f); | 218 | return ((float)i * 1e-5f); |
212 | } | 219 | } |
213 | 220 | ||