Say I have a ray represented by a ray origin & a unit length direction vector and
a point some-where along the ray - how do I find the distance along the ray in the direction of the ray's direction vector from the origin  - ie in the below diagram the distance found would be negative

ray --------------|------------------------------------->
         ^       ray
         |      origin
      point on   dist = 0
        ray
      dist = -1