Why are my functions float parameters being set to 0 when 1 is passed as the argument value?

I was stepping through my C# script in Monodevelop and I noticed something odd. I am passing 2 floats named vt1 and vt2 into a method and in the debugger I can see that vt1 and vt2 are each of value 1 going in as you can see in the first image. Then once I step into the method, the corresponding parameters of the method aren’t set to 1 but to 0 for both variables. The variable I am passing and the parameter name share the same name for simplicity. I have no idea why this is happening and it is causing problems because I use this value to ascertain distance and they keep getting zeroed, does anyone have any ideas why this is happening?


Also, any new float parameters I add to the function have the same effect and passing an argument by hardcoding a float in the call instead of a variable has the same effect.


This is the method being called inside a for loop.

BoxBoxIntersection (obj1, _objs[column], vt1, vt2, ref collision); 

This is the method in question:

private void BoxBoxIntersection(Box2DPhysicsObject obj1, Box2DPhysicsObject obj2, float vt1, float vt2,  ref Box2DCollision collision)

Before being called:


Stepped into:

It was because I was using MonoDevelop, I should have been using Visual Studio to debug and this appears to be a bug of some kind caused by going into a loop. I did fix my problem of debugging the my program by stepping into it earlier in the loop I was able to see correct behavior but somewhere along the line it must cause some problems with MonoDevelop that are not present in Visual Studio.