hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
56 lines (27 loc) • 747 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [Vector2](./server.vector2.md) > [dot](./server.vector2.dot.md)
## Vector2.dot() method
Calculates the dot product of the current vector and another vector.
**Signature:**
```typescript
dot(vector2: Vector2): number;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
vector2
</td><td>
[Vector2](./server.vector2.md)
</td><td>
The vector to calculate the dot product with.
</td></tr>
</tbody></table>
**Returns:**
number
The dot product of the two vectors.