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