[etoys-dev] [etoys-notify] [JIRA] Created: (SQ-1140) Sector tool does not increase angle properly
sthomas1 at gosargon.com
Mon Dec 10 01:10:32 EST 2012
That fixes it and does show full circle at 360.
On Sun, Dec 9, 2012 at 2:08 PM, Ricardo Moran <richi.moran at gmail.com> wrote:
> What if we change SectorMorph>>#angle: to work like this?
> angle: aNumber
> angle = aNumber
> ifTrue: [^ self].
> angle := aNumber \\ 360.
> (angle = 0 and: [aNumber ~= 0])
> ifTrue: [angle := 360].
> self update
> I think this would allow showing a full circle when the angle is 360
> degrees and it won't get out of sync.
> On Sat, Dec 8, 2012 at 5:01 PM, David Corking <lists at dcorking.com> wrote:
>> I take it you see the angle get out of sync: after each revolution, it
>> is one degree too small.
>> I posted a quick fix to the inbox, MorphicExtras-dcorking.75. I made
>> SectorMorph#angle revert to zero when it reaches 360. On reflection, I
>> think my change will do more harm than good.
>> If a learner makes an automated pie chart, it is perfectly reasonable
>> for a sector to grow to 100% or 360 degrees. The user will expect the
>> sector to become a full circle, and my 'fix' breaks that. Therefore I
>> think Richo's original code: modulo 361 - is reasonable.
>> Perhaps we can provide a more subtle fix? Can we use this hack?
>> angle := aNumber \\ 360.000000000001.
>> It still gets out of sync, but much more slowly.
>> etoys-dev mailing list
>> etoys-dev at squeakland.org
> etoys-dev mailing list
> etoys-dev at squeakland.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the etoys-dev