input from mouse relative to screen dimensions- how to

I saw a few-lines-long code for it on forums somewhere, but I can't find it

in the effect of it, however if the mouse was in the centre of the screen - it gave my variable the value 0, if it started moving towards right (or left) side of the screen it gradually gained value, till it gained - for example 90.

so the var valueMouseX was 0 when mouse was in the middle, and if mouse was moved to right or left side - the value grew along with the distance - of the mouse - from the centre of the screen.

same thing coudl be done with MouseY.

do you have an idea what I'm talking about, and/or how to construct such a script? Thank you.

ah. it was something like this :

    var mouseX = 0;

function Update() 
{ 
  mouseX = 90 * ((Input.mousePosition.x - Screen.width / 2) / (Screen.width / 2)); 
}

if someone's interested.