My linear map function is not giving right answers : <p>This formula kinda don't work</p>

<p>I tried to use this formula but it looks like it won't give me right answers, I hope that I can use all values for a linear mapping I hope you guys can help me :) if I need to rewrite this post I would not mind</p>

<blockquote>
  <p>All of the input is: map(200,1, value,0,1);
  It never gives between 0 1.
  Thank you again, guys, here is code </p>
</blockquote>

<pre><code>function map(max_value, first_bottom, first_top, second_top, second_bottom){
    y=(max_value - first_bottom) / (first_top - first_bottom) * 
    (second_top - second_bottom) + second_bottom;
}
</code></pre>
