Skip to content

Commit

Permalink
change float formats from %f to %g
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudkite committed Aug 3, 2013
1 parent f28db09 commit b81c648
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Masonry/NSLayoutConstraint+MASDebugAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ - (NSString *)description {
}

if (self.multiplier != 1) {
[description appendFormat:@" * %f", self.multiplier];
[description appendFormat:@" * %g", self.multiplier];
}

if (self.constant) {
if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) {
[description appendFormat:@" %f", self.constant];
[description appendFormat:@" %g", self.constant];
} else {
[description appendFormat:@" %@ %f", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)];
[description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)];
}
}

Expand Down

0 comments on commit b81c648

Please sign in to comment.