UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

72 lines (34 loc) 930 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Vector2](./server.vector2.md) &gt; [scaleAndAdd](./server.vector2.scaleandadd.md) ## Vector2.scaleAndAdd() method Scales the current vector by a scalar value and adds the result to another vector. **Signature:** ```typescript scaleAndAdd(vector2: Vector2, scale: number): Vector2; ``` ## 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 add the scaled vector to. </td></tr> <tr><td> scale </td><td> number </td><td> The scalar value to scale the vector by. </td></tr> </tbody></table> **Returns:** [Vector2](./server.vector2.md) The current vector.