# Coding Different Trigonometric Functions in Processing

**URL:** <https://discourse.processing.org/t/coding-different-trigonometric-functions-in-processing/22257>\
**Category:** Coding Questions\
**Created:** [June 29, 2020, 6:07pm UTC](https://discourse.processing.org/t/coding-different-trigonometric-functions-in-processing/22257 "2020-06-29T18:07:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Adi](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@Adi](https://discourse.processing.org/u/Adi)\
**Post date:** [June 30, 2020, 7:02pm UTC](https://discourse.processing.org/t/coding-different-trigonometric-functions-in-processing/22257/9 "2020-06-30T19:02:45Z")

</div>

Ok so x is the input. One more request @paulgoux, I would like the same function just the other way around, in your equation negative numbers get closer to 1, and positive numbers get closer to 0. Is there a way to make negative numbers closer to 0, and positive numbers closer to 1.

---

_[View the full topic](https://discourse.processing.org/t/coding-different-trigonometric-functions-in-processing/22257)._
