If this is a generic function for determining where a ray intersects the near plane, then this constance HEAD_SPHERE_RADIUS really shouldn't be here or is named poorly. In this particular use case, the caller is doing something with  the "head sphere", but if this is generally useful, then most callers won't know anything about avatar head sizes... so I think the intersection point is what this generic function should return, and any manipulation beyond that should be done externally by the particular use case you're developing.

That said, see my other comment about the general approach.