# Purpose of cinder::math

**URL:** <https://discourse.libcinder.org/t/purpose-of-cinder-math/465>\
**Category:** Developing Cinder\
**Created:** [December 27, 2016, 9:54pm UTC](https://discourse.libcinder.org/t/purpose-of-cinder-math/465 "2016-12-27T21:54:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeGitb](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@MikeGitb](https://discourse.libcinder.org/u/MikeGitb)\
**Post date:** [December 27, 2016, 9:54pm UTC](https://discourse.libcinder.org/t/purpose-of-cinder-math/465/1 "2016-12-27T21:54:28Z")

</div>

Hello everyone,

I hope you have a great christmas time.

Recently I came across the `cinder::math` class and realized, that it’s functions mostly just forward the arguments to the respective c standard library functions. Now I was wondering if there is any advantage of using the `cinder::math` class instead of the c++ standard library math functions, that already have overloads for different floating point (and in some cases integer) types.

So in summary:  
What is the purpose/advantage of `cinder::math` / when should it be used instead of the standard math functions?

---

<div class="post-metadata">

**Author:** ![gabor\_papp](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/gabor_papp/32/769_2.png) [@gabor\_papp](https://discourse.libcinder.org/u/gabor_papp)\
**Post date:** [December 28, 2016, 12:01pm UTC](https://discourse.libcinder.org/t/purpose-of-cinder-math/465/2 "2016-12-28T12:01:31Z")

</div>

Related discussion from the old forum [https://forum.libcinder.org/topic/advantage-of-math-float-sin-etc](https://forum.libcinder.org/topic/advantage-of-math-float-sin-etc).

---

<div class="post-metadata">

**Author:** ![MikeGitb](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@MikeGitb](https://discourse.libcinder.org/u/MikeGitb)\
**Post date:** [December 29, 2016, 2:50am UTC](https://discourse.libcinder.org/t/purpose-of-cinder-math/465/3 "2016-12-29T02:50:22Z")

</div>

Thank you for the link.  
I probably should clarify that I was referring to the c++ functions (that have an overload for float, double, long double, Integral and even `complex`) and not the c functions (like `sin` and `sinf`) which are currently used.

---

<div class="post-metadata">

**Author:** ![paul.houx](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/paul.houx/32/31_2.png) [@paul.houx](https://discourse.libcinder.org/u/paul.houx)\
**Post date:** [December 29, 2016, 6:17pm UTC](https://discourse.libcinder.org/t/purpose-of-cinder-math/465/4 "2016-12-29T18:17:43Z")

</div>

Hi,

while I can’t tell you the ideas behind the (design of the) `math` namespace, I’d like to point out that they should be largely regarded as “replaced” by the [GLM](https://github.com/cinder/Cinder/tree/master/include/glm) library.

-Paul
