You just need to get the two directional vectors, which is direction = from - to; (and normalize those two directions)

a) from getrealeye to bullet hitpoint
b) from getrealeye to getrealeye += foward * 10000

Then do iprintln(vectorDot(a, b)); and you should understand it, basically it gives you the angle between the two vectors

YouTube has enough videos which explains dot product

Made some example code for IPython, for quick testing:

PHP Code:
import numpy as np

def veclength
(vec):
    return 
np.sqrtdot(vecvec) )
def dot(ab):
    return 
a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
def scale(vecs):
    return [ 
vec[0]*svec[1]*svec[2]*]
def a_minus_b(ab):
    return [ 
a[0]-b[0], a[1]-b[1], a[2]-b[2] ]
def normalize(vec):
    
veclength(vec)    
    return [ 
vec[0]/lvec[1]/lvec[2]/];

player_from = [100,100,100]
player_to_a = [100,100,130]
player_to_b = [100,100,130]
player_to_c = [100,99,130]

dir_a a_minus_b(player_to_aplayer_from);
dir_b a_minus_b(player_to_bplayer_from);
dir_c a_minus_b(player_to_cplayer_from);

dir_a normalizedir_a )
dir_b normalizedir_b )
dir_c normalizedir_c )

print(
"dir_a"dir_a)
print(
"dir_b"dir_b)
print(
"dir_c"dir_c)

print(
"dot(dir_a, dir_b)"dot(dir_adir_b))
print(
"dot(dir_a, dir_c)"dot(dir_adir_c)) 
Output:

PHP Code:
('dir_a', [0.00.01.0])
(
'dir_b', [0.00.01.0])
(
'dir_c', [0.0, -0.0333148302326384820.99944490697915433])
(
'dot(dir_a, dir_b)'1.0)
(
'dot(dir_a, dir_c)'0.99944490697915433