UNPKG

hytopia

Version:

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

56 lines (27 loc) 776 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Matrix2](./server.matrix2.md) &gt; [fromRotation](./server.matrix2.fromrotation.md) ## Matrix2.fromRotation() method Creates a new `Matrix2` instance from a rotation of identity matrix. **Signature:** ```typescript static fromRotation(angle: number): Matrix2; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> angle </td><td> number </td><td> The angle in radians to rotate the matrix by. </td></tr> </tbody></table> **Returns:** [Matrix2](./server.matrix2.md) A new `Matrix2` instance.