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

David Corking lists at dcorking.com
Sat Dec 8 15:01:58 EST 2012


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


More information about the etoys-dev mailing list