# Re: \[Quiz\] Turtle Graphics (#104)

**URL:** <https://www.ruby-forum.com/t/re-quiz-turtle-graphics-104/78680>\
**Category:** Ruby\
**Created:** [December 7, 2006, 8:24pm UTC](https://www.ruby-forum.com/t/re-quiz-turtle-graphics-104/78680 "2006-12-07T20:24:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidtl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Post date:** [December 7, 2006, 8:24pm UTC](https://www.ruby-forum.com/t/re-quiz-turtle-graphics-104/78680/1 "2006-12-07T20:24:34Z")

</div>

Paul L. 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 … )

---

<div class="post-metadata">

**Author:** ![davidtl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Post date:** [December 7, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/re-quiz-turtle-graphics-104/78680/2 "2006-12-07T20:56:46Z")

</div>

David T. wrote:

> Paul L. 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.
