Re: [PHP-DEV] Gauging Interest:RFC to add map() function

2013-06-26 Thread Jeremy Curcio
>The functionality provided is uncommon but perhaps usefu. However, I am>*very* against the name `map` which has a very established meaning in the>programming world; others have already mentioned this but I felt I should>mention it again.I'd like to note that I am not married to the name. If there

Re: [PHP-DEV] Gauging Interest:RFC to add map() function

2013-06-26 Thread Jeremy Curcio
>I am curious with something that is so easy; why would you want it in core?A lot of the Math Functions could be considered "so easy".abs() could be written out as:    function abs($n) {        if ($n >= 0) return $n;        else return $n*-1;    }pi() could be replaced by simply setting a global v

[PHP-DEV] Gauging Interest:RFC to add map() function

2013-06-26 Thread Jeremy Curcio
Hello,I would like to submit an RFC to add a new function to the PHP language. The function would be called "map()". The purpose of this function would be to take an existing value within a range and make it to a corresponding location within a new range.The map() method would have 5 required param