---
title: "dotProduct(of:vector:)"
framework: vision
role: symbol
role_heading: Type Method
path: "vision/vnvector/dotproduct(of:vector:)"
---

# dotProduct(of:vector:)

Caclulates the dot product of two vectors.

## Declaration

```swift
class func dotProduct(of v1: VNVector, vector v2: VNVector) -> Double
```

## Parameters

- `v1`: The first vector.
- `v2`: The second vector.

## Return Value

Return Value The dot product value.

## See Also

### Inspecting a Vector

- [length](vision/vnvector/length.md)
- [r](vision/vnvector/r.md)
- [theta](vision/vnvector/theta.md)
- [squaredLength](vision/vnvector/squaredlength.md)
- [x](vision/vnvector/x.md)
- [y](vision/vnvector/y.md)
- [unitVector(for:)](vision/vnvector/unitvector(for:).md)
