changeset 19702 | 79ea925e1f35 |
parent 19701 | 92aff12989fa |
child 19707 | 8e312f358d84 |
child 19768 | 55e36a939e1e |
--- a/Number.st Wed May 04 17:51:54 2016 +0200 +++ b/Number.st Wed May 04 17:53:29 2016 +0200 @@ -1054,14 +1054,16 @@ ^ self. ! -asPercentFrom:hundredPercent - "how many percent is the receiver of the argument" +asPercentFrom:fullAmount + "what is the percentage + taking the receiver's value from the argument" - ^ (self / hundredPercent) * 100. + ^ (self / fullAmount) * 100. " 20 asPercentFrom:100 (10 asPercentFrom:156) asFixedPoint:2 + (15.6 asPercentFrom:156) asFixedPoint:2 " !