Class MathUtils
Utility functions for math equations and features.
Namespace: nickmaltbie.MinimapTools.Utils
Assembly: cs.temp.dll.dll
Syntax
public static class MathUtils
Methods
GetRotatedAboutOrigin(Single, Single, Single)
Get the coordinates of a point rotated about the origin (0,0).
Declaration
public static (float, float) GetRotatedAboutOrigin(float x1, float y1, float rotation)
Parameters
Type | Name | Description |
---|---|---|
Single | x1 | X value of point to rotate. |
Single | y1 | Y value of point to rotate. |
Single | rotation | Amount to rotate point about origin in degrees. |
Returns
Type | Description |
---|---|
(T1, T2)<Single, Single> | Rotated position of point (x1, y1) about the origin (0,0). |
GetRotatedPoint(Single, Single, Single, Single, Single)
Get the coordinates of a point rotated about a pivlot.
Declaration
public static (float, float) GetRotatedPoint(float x1, float y1, float pivotX, float pivotY, float rotation)
Parameters
Type | Name | Description |
---|---|---|
Single | x1 | X value of point to rotate. |
Single | y1 | Y value of point to rotate. |
Single | pivotX | X value of pivot. |
Single | pivotY | Y value of pivot. |
Single | rotation | Amount to rotate point about pivot in degrees. |
Returns
Type | Description |
---|---|
(T1, T2)<Single, Single> | Rotated position of point (x1, y1) about the pivot. |