From a3bde2f71007cdca050c37f37014ca57241316c8 Mon Sep 17 00:00:00 2001 From: Curtis Hard Date: Tue, 17 Jan 2017 09:22:19 +0000 Subject: [PATCH] Fixed value working out issue --- source/IJSVGUnitLength.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/IJSVGUnitLength.m b/source/IJSVGUnitLength.m index 7843571..f290a98 100644 --- a/source/IJSVGUnitLength.m +++ b/source/IJSVGUnitLength.m @@ -58,7 +58,7 @@ - (CGFloat)computeValue:(CGFloat)anotherValue { if(self.type == IJSVGUnitLengthTypePercentage) { - return ((anotherValue/100)*self.value); + return ((anotherValue/100.f)*(self.value*100.f)); } return self.value; } @@ -76,4 +76,9 @@ return [NSString stringWithFormat:@"%g",self.value]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"%f%@",self.value,(self.type == IJSVGUnitLengthTypePercentage ? @"%" : @"")]; +} + @end