I’ve got a really weird problem I wanted to see if anyone could give me a clue on. My code works fine in the editor, but on my iPod, it does the following:
I pass a value (2.5) of type double as a parameter to a method, and then inside that method, I use Debug.Log() to check the value of the argument, and it shows up as something like 1.14E-316.
I’ve tried everything I know and can’t figure out why the value isn’t coming out right on the other end. Any ideas why this might happen?
I don’t remember now why I’m using doubles instead of floats. The weird thing is, I have lots of other methods almost identical to this one that also use doubles and they work fine.
I hate to dredge up an old thread, but this problem has resurfaced. It just spontaneously disappeared last time, but now it’s reappeared, and I have no idea how to go about troubleshooting it. It is probably something to do with my code, but I can’t for the life of me begin to understand what it is I could be doing that would case a hard-coded value, when passed as an argument, to come out completely different on the other side. Can anyone even suggest where I should start looking?
Normally in C++ I would suspect a heap corruption due to a wayward pointer, but C#, to my knowledge, doesn’t allow this.