Float Conversion Issue
- by user1407570
I have an issue after converted a float from a string, the result of my operation is null
The NSLogs give the right value but vitesseMoyenne is equal to null
-(void)setVitesseMoyenne:(float)uneDistanceTotale:(NSString*)unTempsTotal
{
//float tempEnFloat = [unTempsTotal floatValue];
NSLog(@"%@",unTempsTotal);
float calculVitesseMoyenne = uneDistanceTotale / [unTempsTotal floatValue];
NSLog(@"%f",calculVitesseMoyenne);
vitesseMoyenne = [NSString stringWithFormat:@"%f", calculVitesseMoyenne];
}
Can you see what is wrong ?