Eye Angle
I wanted to know if I take two gaze values of the same eye I can calculate the angle that eye did?
Thanks for your support.

Official comment
We expose a 3D unit vector for each eye representing the direction.
If initially the eye is looking forward, you will get a value of V0=(x=0, y=0, z=1).
Later, let's say the eye looks right, and you get a value of V1=(x=0.7, x=0, x=0.7).
The dot product between two vectors is the cosine of the angle between them, so lets take the dot product:
dot = V0.x * V1.x + V0.y * V1.y + V0.z * V1.z = 0 * 0.7 + 0 * 0 + 1 * 0.7 = 0.7
If you take the inverse cosine, you then get the angle
angle = acos(dot) = 0.795 (radians) ~= 45 degrees
Comment actions 
As for 2D gaze angles, and more detail: I just wrote a FAQ article on this topic.
Please sign in to leave a comment.
Comments
4 comments