change float formats from %f to %g
Showing
1 changed file
with
3 additions
and
3 deletions
@@ -92,14 +92,14 @@ | @@ -92,14 +92,14 @@ | ||
92 | } | 92 | } |
93 | 93 | ||
94 | if (self.multiplier != 1) { | 94 | if (self.multiplier != 1) { |
95 | - [description appendFormat:@" * %f", self.multiplier]; | 95 | + [description appendFormat:@" * %g", self.multiplier]; |
96 | } | 96 | } |
97 | 97 | ||
98 | if (self.constant) { | 98 | if (self.constant) { |
99 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { | 99 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { |
100 | - [description appendFormat:@" %f", self.constant]; | 100 | + [description appendFormat:@" %g", self.constant]; |
101 | } else { | 101 | } else { |
102 | - [description appendFormat:@" %@ %f", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; | 102 | + [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 |
-
Please register or login to post a comment