I tried making an ESP for CSGO , but the math isnt correct , the Aimbot angles are wrong 100%. Im not sure about the World to Screen



Code:
	void CalculateAim(float *src, float *dst, float *angles)
	{
		double delta[3] = { (src[0] - dst[0]), (src[1] - dst[1]), (src[2] - dst[2]) };
		double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
		angles[0] = atan(delta[2] / hyp) * 180.0 / 3.14159265;
		angles[1] = (float)(atanf(delta[1] / delta[0]) * 57.295779513082f);
		if (delta[0] >= 0.0) angles[1] += 180.0f;
		if (angles[1]>180) angles[1] -= 360.0f;
		//normalize
		if (angles[1] > 180.0f)angles[1] -= 360;
		if (angles[1] <-180.0f)angles[1] += 360;
		if (angles[0] > 89.0f)angles[0] -= 89;
		if (angles[0] <-89.0f)angles[0] += 89;
	}

	void AngToScreen(float Aim[2], float View[2], float *XY)
	{
		float Xdif = View[1] - Aim[1]; float Ydif = Aim[0] - View[0];
		Xdif += 45; Ydif += 45;
		XY[0] = Xdif*(Width / 90);
		XY[1] = Ydif*(Height / 90);
	}