Class MathExtensions
Extension methods and helper functions for various math data
Inheritance
MathExtensions
Assembly: cs.temp.dll.dll
public static class MathExtensions
Methods
Declaration
public static Vector3 ClampComponentWise(Vector3 value, Vector3 min, Vector3 max)
Parameters
| Type |
Name |
Description |
| Vector3 |
value |
|
| Vector3 |
min |
|
| Vector3 |
max |
|
Returns
Declaration
public static Vector3 ClampComponentWise(Vector3 value, Vector3 min, Vector3 max)
Parameters
| Type |
Name |
Description |
| Vector3 |
value |
|
| Vector3 |
min |
|
| Vector3 |
max |
|
Returns
Declaration
public static int CubicToLinearIndex(Vector3Int ndx, Vector3Int size)
Parameters
| Type |
Name |
Description |
| Vector3Int |
ndx |
|
| Vector3Int |
size |
|
Returns
Declaration
public static int CubicToLinearIndex(Vector3Int ndx, Vector3Int size)
Parameters
| Type |
Name |
Description |
| Vector3Int |
ndx |
|
| Vector3Int |
size |
|
Returns
Declaration
public static Vector3Int LinearToCubicIndex(int linearIndex, Vector3Int size)
Parameters
| Type |
Name |
Description |
| Int32 |
linearIndex |
|
| Vector3Int |
size |
|
Returns
| Type |
Description |
| Vector3Int |
|
Declaration
public static Vector3Int LinearToCubicIndex(int linearIndex, Vector3Int size)
Parameters
| Type |
Name |
Description |
| Int32 |
linearIndex |
|
| Vector3Int |
size |
|
Returns
| Type |
Description |
| Vector3Int |
|
Declaration
public static int MostSignificantBit(this int x)
Parameters
| Type |
Name |
Description |
| Int32 |
x |
|
Returns
Declaration
public static int MostSignificantBit(this int x)
Parameters
| Type |
Name |
Description |
| Int32 |
x |
|
Returns
Declaration
public static int PowerOfTwoGreaterThanOrEqualTo(this int v)
Parameters
| Type |
Name |
Description |
| Int32 |
v |
|
Returns
Declaration
public static int PowerOfTwoGreaterThanOrEqualTo(this int v)
Parameters
| Type |
Name |
Description |
| Int32 |
v |
|
Returns
Declaration
public static Vector3Int PowerOfTwoGreaterThanOrEqualTo(this Vector3Int v)
Parameters
| Type |
Name |
Description |
| Vector3Int |
v |
|
Returns
| Type |
Description |
| Vector3Int |
|
Declaration
public static Vector3Int PowerOfTwoGreaterThanOrEqualTo(this Vector3Int v)
Parameters
| Type |
Name |
Description |
| Vector3Int |
v |
|
Returns
| Type |
Description |
| Vector3Int |
|
Sets the value to zero if greater than the specified amount.
Declaration
public static int ResetIfGreaterThan(this int value, int amount)
Parameters
Returns
Sets the value to zero if greater than the specified amount.
Declaration
public static int ResetIfGreaterThan(this int value, int amount)
Parameters
Returns