Find initial velocity based on angle height displ

Hello,

I am having some serious issues that for the life of me I cannot figure out.

I need to find the initial velocity to hit the target, but I need to account for the height difference. I have the following code:

	function GetVelocity(target : Transform){
		var tv = target.transform.position - m_FirePoint.transform.position;
		var g = 9.8;
		var r = Mathf.Abs(tv.z);
		var a = Mathf.Sin(90);
		var v = Mathf.Sqrt((r*g) / a);
		return v;
	}

The Projectile falls short… Is there something I am not taking into account? The angle is always 45

bump