Vector3 center - help with Unity Documentation

In the example from the following ScriptReference in the Unity Documentation I found something that I still can’t explain to myself. I made a solid research around the net but not even a clue appeared for me. So, I hope I can find a comprehensive answare here. Please, keep in mind that I am not an expert and my be the answer is infront of my face but I just can’t see it! :frowning:

Here is the reference:
http://docs.unity3d.com/ScriptReference/NavMesh.SamplePosition.html

My question is the following - in the example script for the NavMesh.SamplePosition a variable “Vector3 center” is created , and later referenced 2 lines below in the “Vector3 randomPoint” vector variable.
I have searched everywhere for this “Vector3 center” but it just does not exists.

Even in the proper Script Reference for the Vector3:

So please, can anyone explain what is the value of this “center” Vector3, and how did it get any value to be assigned two lines below? I just don’t get it. I undertand all the rest of the script, just this detail is not clear.

Is it the center of the NavMeshAgent? And if it is, how is that this parameter “center” does not appear on the reference page for the Vector3? :S I am so confused, please, help will be very appreciated.

Thanks in advance.

It’s a parameter declared as part of the RandomPoint method. The value comes from the value that’s passed to the function when it’s called later in Update

if (RandomPoint(transform.position, range, out point))

transform.position is being passed to the function as the value for the center parameter. Inside the function that value is stored in the center variable.

Here’s an example…

void Test(int x)
{
  Debug.Log("x=" + x);
}

Test(10);   // 10 is passed to the Test function, inside that function the value is accessed by the x variable. The function will print x=10

int y = 42;
Test(y);     // passing the value of the variable y, inside the function it's accessed by the x variable. The function will print x=42.

If you need more help with learning about parameters I’d suggest googling for some C# beginner tutorials.