Inheritance
System.Object
MathUtils
public static class MathUtils
Methods
Declaration
public static int abs(this int value)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static float abs(this float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Type |
Description |
System.Single |
|
Declaration
public static int ceil(this float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static int clamp(this int value, int min, int max)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
System.Int32 |
min |
|
System.Int32 |
max |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static float clamp(this float value, float min, float max)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
System.Single |
min |
|
System.Single |
max |
|
Returns
Type |
Description |
System.Single |
|
Declaration
public static float cross(this Vector2 vector1, Vector2 vector2)
Parameters
Type |
Name |
Description |
Vector2 |
vector1 |
|
Vector2 |
vector2 |
|
Returns
Type |
Description |
System.Single |
|
Declaration
public static int floor(this float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static bool isConvexPolygon(Offset[] polygonVerts, int polygonSize)
Parameters
Type |
Name |
Description |
Offset[] |
polygonVerts |
|
System.Int32 |
polygonSize |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool isFinite(this float it)
Parameters
Type |
Name |
Description |
System.Single |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool isInfinite(this float it)
Parameters
Type |
Name |
Description |
System.Single |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static bool isNaN(this float it)
Parameters
Type |
Name |
Description |
System.Single |
it |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
public static float lerpFloat(float a, float b, float t)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
System.Single |
t |
|
Returns
Type |
Description |
System.Single |
|
Declaration
public static float? lerpNullableFloat(float? a, float? b, float t)
Parameters
Type |
Name |
Description |
System.Nullable<System.Single> |
a |
|
System.Nullable<System.Single> |
b |
|
System.Single |
t |
|
Returns
Type |
Description |
System.Nullable<System.Single> |
|
Declaration
public static int round(this float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static int sign(this float value)
Parameters
Type |
Name |
Description |
System.Single |
value |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static bool valueNearlyZero(this float x, float? tolerance = default(float? ))
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Nullable<System.Single> |
tolerance |
|
Returns
Type |
Description |
System.Boolean |
|