Objective C Insanity -- simple assignement to a single float variable results in {{{CRAZY}}} values
- by morgancodes
memberA is defined in the header of ClassA.
memberB is defined in the header of ClassB.
ClassB is a subclass of ClassA
Inside an instance of ClassB, setting memberA via simple assignment:
memberA = 0.05
...also changes memberB, but to a crazy number -- 1028443341. Additionally, assigning 0.05 to memberA results in memberA showing up in the debugger as 5.33083531e-38.
Both variables are floats, neither is a pointer. I'm almost certianly making some noob mistake, but I don't have any clue what it might be. What sort of screw-up might make it so assigning a value to one variable results in crazy values appearing in two variables?
I can give more details or real code, but figured I'd keep it simple to start with in case it's an obvious problem/solution.