# Vec3.dot

Returns the <a target="_blank" href="https://en.wikipedia.org/wiki/Dot_product">dot product</a> of a vector.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
vec3:dot( v2 )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Vec3.md#dot)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `v1` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The first vector. |
| `v2` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The second vector. |

**Returns:**

| Type | Description |
| --- | --- |
| number | The dot product. |

## Terrain

``` { .lua .api-signature }
vec3:dot( v2 )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Userdata/Vec3.md#dot)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `v1` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The first vector. |
| `v2` | [Vec3](../Terrain-Script-Environment/Userdata/Vec3.md) | The second vector. |

**Returns:**

| Type | Description |
| --- | --- |
| number | The dot product. |
