Below is how I would have previously truncated a float to two decimal places
NSLog(@\" %.02f %.02f %.02f\", r, g, b);
I checked the docs an
Swift2 example: Screen width of iOS device formatting the Float removing the decimal
print(NSString(format: "Screen width = %.0f pixels", CGRectGetWidth(self.view.frame)))