[etoys-dev] [etoys-notify] [JIRA] Created: (SQ-1140) Sector tool does not increase angle properly

Steve Thomas sthomas1 at gosargon.com
Mon Dec 10 01:10:32 EST 2012


Richo,

That fixes it and does show full circle at 360.

Thanks,
Stephen

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.
>
> Cheers,
> Richo
>
> 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.
>>
>> David
>> _______________________________________________
>> etoys-dev mailing list
>> etoys-dev at squeakland.org
>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>
>
>
> _______________________________________________
> etoys-dev mailing list
> etoys-dev at squeakland.org
> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20121209/d8248a9e/attachment.html>


More information about the etoys-dev mailing list