How does GetCursorPos() really work?

Hi All!
I am new here on the Rhino forum, however I am not new Rhino user.
Recently I started to play with Python scripting and now I wonder how does the GetCursorPos() function work, more precisely: in what way are 2D screen coordinates translated to world/3D coordinates?

I’ve created a script that puts a line between camera position and cursor position:

import rhinoscriptsyntax as rs
def main():
    something=rs.GetPoint("indicate point")
    if not cursordata: return
if __name__ =="__main__":

The effect is visible below:

Here I “shooted” lines towards the same object (camera target was set at it), with the same zoom, but at different angles. And lengths of the lines are completely different!
Can anybody answer how is depth of the cursor position calculated in the GetCursorPos() function?