# How do you reverse an equation?

1. Jan 24, 2005

### eNathan

I have an equation, that I used in a software I made (Delphi). Now, I want to sort of "reverse" this equation.

Y = 0-((( ClickedY * (1800 / PicHeight ))*2)-1800)
X = (( ClickedX * (1800 / PicWidth ))*2)-1800

What does ClickedY = if you know Y and the PicHeight?

what does ClickedX = if you know X and the PicWidth?

Thanks in advance, hopefully, there is a mathematician that can solve this.

2. Jan 24, 2005

### e(ho0n3

Easy. Just solve for ClickedX and ClickedY. Surely you can do this.

3. Jan 24, 2005

### Muzza

Y = 0 - ((( ClickedY * (1800 / PicHeight ))*2)-1800)
-Y = ((( ClickedY * (1800 / PicHeight ))*2)-1800)
1800 - Y = (ClickedY * (1800 / PicHeight )) *2
(1800 - Y)/2 = ClickedY * (1800 / PicHeight )
ClickedY = PicHeight/1800 * (1800 - Y)/2,

and similarly for the other equation.

4. Jan 24, 2005

### eNathan

OK, is this it.

Y = 0-((( ClickedY * (1800 / PicHeight ))*2)-1800)
X = (( ClickedX * (1800 / PicWidth ))*2)-1800

clickedX = ((PicHeight / 1800) * X) / 2
clickedY = ((PicWidth / 1800) * Y) / 2