This is really strange. I am getting a CGFloat value from my view and sending it over to my viewController which will pass it along to my audio engine. However, the CGFloat gets modified somehow between the view and viewController. Totally stumped.
Here's the method in the view
-(void)mod:(CGFloat)value
{
if(value < 0) value = 0.;
if(value > self.bounds.size.width - 10)value = self.bounds.size.width - 10.f;
value = value / (self.bounds.size.width - 10.f) ;
NSLog(@"value %g", value); ///prints a value between 0.0 - 1.0
[viewController mod:value forVoice:voiceToPlay];
}
that prints a value between 0.0 - 1.0
then in my viewController this method receives it...
-(void)mod:(CGFloat)value forVoice:(NSUInteger)voice
{
NSLog(@"mod in view control %g", value);
[audioController mod:value forVoice:voice];
}
and this prints totally wrong numbers such as 1.0842e-19, 2, -2
It's probably something simple, but I can't figure out what it is!! Thanks for your help.