Returns the squared distance between this vector and [code]b[/code].
Returns the squared distance between this vector and [code]to[/code].
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
<methodname="distance_to"qualifiers="const">
<returntype="float"/>
<argumentindex="0"name="b" type="Vector3"/>
<argumentindex="0"name="to" type="Vector3"/>
<description>
Returns the distance between this vector and [code]b[/code].
Returns the distance between this vector and [code]to[/code].
</description>
</method>
<methodname="dot"qualifiers="const">
<returntype="float"/>
<argumentindex="0"name="with"type="Vector3"/>
<description>
Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.
The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.
When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].