lib/teacup/calculations.rb in teacup-2.1.16 vs lib/teacup/calculations.rb in teacup-2.2.0
- old
+ new
@@ -8,12 +8,12 @@
offset = amount.slice(location+1, amount.size).gsub(' ', '').to_f
percent = amount.slice(0, location).to_f / 100.0
case dimension
when :width
- view.superview.frame.size.width * percent + offset
+ (view.superview.frame.size.width * percent + offset).round
when :height
- view.superview.frame.size.height * percent + offset
+ (view.superview.frame.size.height * percent + offset).round
else
raise "Unknown dimension #{dimension}"
end
else
amount