# Math problem

**URL:** <https://forum.kirupa.com/t/math-problem/298215>\
**Category:** Uncategorized\
**Created:** [October 15, 2009, 9:26am UTC](https://forum.kirupa.com/t/math-problem/298215 "2009-10-15T09:26:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![substance](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@substance](https://forum.kirupa.com/u/substance)\
**Post date:** [October 15, 2009, 9:26am UTC](https://forum.kirupa.com/t/math-problem/298215/1 "2009-10-15T09:26:00Z")

</div>

I want to generate a number(z) from a given number(x)  
I want z to be higher the closer x is to any 90 degree angle(90, 180,270, 360)

example; If x is 90 then z should be 1. If x is 45 then z should be 0(because 45 is the furtherst you can be from a 90degree angle)

Any ideas?
