Thanks,
Code:
Vector3 s = new Vector3(InputManager.startX, InputManager.startY,
InputManager.startZ);
Vector3 e = new Vector3(InputManager.endX, InputManager.endY, InputManager.endZ);
float t = InputManager.startY * InputManager.endY + InputManager.startZ * InputManager.endZ;
float sRoot = (float)Math.Sqrt((InputManager.startY * InputManager.startY) + (InputManager.startZ * InputManager.endZ));
float eRoot = (InputManager.endY * InputManager.endY) + (InputManager.endZ * InputManager.endZ);
float costheta = (float)((t) / Math.Sqrt(InputManager.endZ * eRoot));
Output i am getting:
Start : Vector3(1, 1, 1) End : Vector3(-87.91284, -54.91942, 142.8247) Cos Theata : 0.04806909 Start : Vector3(1, 1, 1) End : Vector3(-88.92979, -52.88537, 141.8078) Cos Theata : 0.04933823 Start : Vector3(1, 1, 1) End : Vector3(-89.94674, -50.85131, 140.7908) Cos Theata : 0.05063638 Start : Vector3(1, 1, 1) End : Vector3(-89.94674, -50.85131, 140.7908) Cos Theata : 0.05063638 Start : Vector3(1, 1, 1) End : Vector3(-90.96368, -48.81727, 139.7739) Cos Theata : 0.05196397 Start : Vector3(1, 1, 1) End : Vector3(-90.96368, -48.81727, 139.7739) Cos Theata : 0.05196397 Start : Vector3(1, 1, 1) End : Vector3(-91.98063, -46.78321, 138.7569) Cos Theata : 0.05332147
oops i m not getting the right output........
any Suggestion....