# Rotation issue with frameCount - how could i solve this with modulo?

**URL:** <https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [January 9, 2022, 2:54pm UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538 "2022-01-09T14:54:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![srt](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@srt](https://discourse.processing.org/u/srt)\
**Post date:** [January 9, 2022, 2:54pm UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538/1 "2022-01-09T14:54:15Z")

</div>

Hey i need your help with the rotation.

here the part of the code which relates to my question:

float rotation = map(sin(radians(frameCount)), 1, -1, 45, -45);  
rotateY(radians(rotation));

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 9, 2022, 5:31pm UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538/2 "2022-01-09T17:31:05Z")

</div>

> [@srt](#):
>
> (radians(frameCount))

radians(frameCount%360)

---

<div class="post-metadata">

**Author:** ![srt](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@srt](https://discourse.processing.org/u/srt)\
**Post date:** [January 9, 2022, 6:47pm UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538/3 "2022-01-09T18:47:53Z")

</div>

ah so easy! many thanks!

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 10, 2022, 1:14am UTC](https://discourse.processing.org/t/rotation-issue-with-framecount-how-could-i-solve-this-with-modulo/34538/4 "2022-01-10T01:14:08Z")

</div>

Hello @srt,

What is the rotation issue with frameCount?  
What is the solution presented doing?  
What did the solution presented solve?

@srt You need to understand this.

`:)`
