I will add something like Number>>percent ^Percentage of: self And Percentage value should be The number / 100, the printOn: can show the % sign, something like '50 %'. Obviously this must behave exactly as a number. This allows to be extended in case something specific is needed for percentages. (I can use it in RenoirSt and remove one of the extensions I have)
Too bad % is used as a binary selector :( . Writing 32 % is a lot better On Feb 16, 2015 1:37 PM, "Sean P. DeNigris" <[email protected]> wrote: > What do you think of this in core? Like a mini Aconcagua ;) > Number>>#percent > "e.g. 20 / 40 = 50 percent" > ^ self / 100.0 > > > > ----- > Cheers, > Sean > -- > View this message in context: > http://forum.world.st/Number-percent-tp4805988.html > Sent from the Pharo Smalltalk Developers mailing list archive at > Nabble.com. > >
