Skip to content

Instantly share code, notes, and snippets.

@mrsidique
Created September 13, 2012 00:06
Show Gist options
  • Save mrsidique/3710901 to your computer and use it in GitHub Desktop.
Save mrsidique/3710901 to your computer and use it in GitHub Desktop.
float backStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"backStrokeRotationAngleValue"]floatValue];
float forwardStrokeRotationAngleValue = [[notificationDictionary valueForKey:@"forwardStrokeRotationAngleValue"]floatValue];
if (backStrokeRotationValue < 0) {
backStrokeRotationAngleValue = backStrokeRotationAngleValue * -1;
backStrokeRotationOpeningString = @"closing";
}
else if (backStrokeRotationAngleValue == 0) {
backStrokeRotationOpeningString = @"";
}
else{
backStrokeRotationOpeningString = @"opening";
}
if (forwardStrokeRotationAngleValue < 0) {
forwardStrokeRotationAngleValue = forwardStrokeRotationAngleValue * -1;
forwardStrokeRotationOpeningString = @"closing";
}
else if (forwardStrokeRotationAngleValue == 0) {
forwardStrokeRotationOpeningString = @"";
}
else{
forwardStrokeRotationOpeningString = @"opening";
}
backStrokeRotationValueString = [NSString stringWithFormat:@"%.0f", fabsf(backStrokeRotationAngleValue)];
forwardStrokeRotationValueString = [NSString stringWithFormat:@"%.0f", fabsf(forwardStrokeRotationAngleValue)];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment