Float changes value after function call

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?

Thanks!

doubles don’t exist on the iphone.
You can use Int and Float.

But if 0 comes out (the value you have there represents 0) it sounds more like something else goes wrong pretty badly.

Any chance for the code that is messing it?

Sorry for the late reply (my life’s been super busy lately).

Here’s the method:

public void AnimateFOVTo(Camera v, float e, double seconds, AnimatedValue.CompletionDelegate del)
{
Debug.Log(seconds); // Outputs 1.14-E316
}

I call it thus:

animator.AnimateFOVTo(Camera.mainCamera, 9f, 2.5f, null);

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.

Are you sure that this is the only place that calls this?
1000000% sure I mean?

Yes.