# Wave displaced circle

**URL:** <https://discourse.processing.org/t/wave-displaced-circle/808>\
**Category:** Coding Questions\
**Created:** [June 9, 2018, 2:11pm UTC](https://discourse.processing.org/t/wave-displaced-circle/808 "2018-06-09T14:11:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [June 10, 2018, 11:08am UTC](https://discourse.processing.org/t/wave-displaced-circle/808/5 "2018-06-10T11:08:31Z")

</div>

Good job !

I was stuck on this part :

```auto
float radDist(float t1, float t2) {
  while (t1>=TWO_PI) t1-= TWO_PI;
  while (t1<0) t1 += TWO_PI;

  while (t2>=TWO_PI) t2-= TWO_PI;
  while (t2<0) t2 += TWO_PI;

  float d = abs(t1-t2);
  if (d>=PI) {
    d = PI-(d-PI);
  }
  return d;
}

```

Thanks @lmccandless @kfrajer

---

_[View the full topic](https://discourse.processing.org/t/wave-displaced-circle/808)._
