[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [Solution] [Quiz] Turtle Graphics (#104

email55555 email55555

12/7/2006 7:23:00 PM

Paul Lutus wrote:

> These two lines can be replaced with:
>
> degrees %= 360
>
> And the resulting method will run much faster if the degrees argument is
> large.

Got it. Thanks. ( the result of a % b will be >= 0 if b > 0 ... )

1 Answer

Paul Lutus

12/7/2006 7:54:00 PM

0

David Tran wrote:

> Paul Lutus wrote:
>
>> These two lines can be replaced with:
>>
>> degrees %= 360
>>
>> And the resulting method will run much faster if the degrees argument is
>> large.
>
> Got it. Thanks. ( the result of a % b will be >= 0 if b > 0 ... )

The result will also be >= 0 if a < 0. I am adding this clarification for
other readers of the newsgroup, I am sure you understand it.

--
Paul Lutus
http://www.ara...