Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Floating point inconsistency in mono

I trid this in .NET immediate window:

30f + 0.5f

And get 30.5 as expected. In mono, I get 30 instead. What is the reason?

Details:

  • .NET: Visual Studio 2010 SP1
  • mono: Unity3D 3.5.6f4 equipped with MonoDevelop 2.8.2
like image 362
André Rodrigues Avatar asked Nov 14 '12 19:11

André Rodrigues


1 Answers

Upgrade your MonoDevelop to 3.0.5

like image 179
jstedfast Avatar answered Nov 07 '22 15:11

jstedfast