Why are the Raycast propeties changeing?

I noticed during the If statement in ClickDetect for Physics.Raycast that the properties kept changing.

like for example in (2) Beginner Scripting Examples: Basic Raycasting that the properties were 

Raycast(Vector3 orgin, Vector3 direction, float MaxDistance, int LayerMask)

But in this video it was Raycast(Ray ray, float MaxDistance, int LayerMask)

Then it changed to Raycast(Ray ray, out RaycastHit hitInfo, float MaxDistance, int LayerMask)

  • Jonathan Gonzalez(jgonzalez) replied

    A basic raycast can detect colliders and we can use that for general detection. In this lesson we want to get a specific location of where the raycast hits something. To get the Vector3 (the position) of where the raycast hits another collider, we need to use a RaycastHit. It's a parameter we can use within the Raycast. 

    Ray is used since we need to get the position of where the mouse is at and convert it to a world location. ScreenPointToRay provides this for us and it returns a Ray. This in turn includes both a origin (starting point) and direction, so we can use it alone for both of these. Hope that helps you understand it. If you have any other questions let me know.