|
static Rectangle | Copy (Rectangle other) |
| Copies the rectangle object More...
|
|
static Vector3 | Divide (Vector3 a, Vector3 b) |
| Divides two vector3 objects More...
|
|
static Vector3 | ToVector3 (IntVector v) |
| Converts an IntVector to a Vector3 More...
|
|
static Vector3 | ToVector3 (Vector3Int v) |
|
static Vector4 | ToVector4 (Vector3 v, float w) |
|
static IntVector | WorldToGrid (Vector3 WorldCoord, Vector3 GridCellSize) |
| Converts the world coordinates to grid coordinates More...
|
|
static Vector3 | GridToWorld (Vector3 GridCellSize, IntVector v) |
| Converts the grid coordinate to world coordinate More...
|
|
static Vector3 | GridToWorld (Vector3 GridCellSize, Vector3 v) |
| Converts the grid coordinate to world coordinate More...
|
|
static IntVector | ToIntVector (Vector3 v) |
| Converts an IntVector to a Vector3, with the XYZ components floored More...
|
|
static Vector3Int | FloorToVector3Int (Vector3 v) |
|
static Vector3Int | RoundToVector3Int (Vector3 v) |
|
static Vector3 | V3FloorToInt (Vector3 v) |
|
static Vector3 | V3RoundToInt (Vector3 v) |
|
static Vector3 | ComponentMin (Vector3 a, Vector3 b) |
|
static Vector3 | ComponentMax (Vector3 a, Vector3 b) |
|
static IntVector | RoundToIntVector (Vector3 v) |
| Rounds to an IntVector, with the XYZ components rounded to the nearest int More...
|
|
static Vector3 | SnapToGrid (Vector3 position, Vector3 gridCellSize) |
| Snaps the position to the nearest grid cell location More...
|
|
static Vector3 | SnapToGrid (Vector3 position, Vector3 gridCellSize, bool useRounding) |
| Snaps the position to the nearest grid cell location More...
|
|
static bool | Intersects (Rect a, Rect b) |
| Checks if the two rectangles intersect More...
|
|
static Vector2 | ClosestPointOnRect (Rect rect, Vector2 p) |
|
static Rect | ExpandRect (Rect bounds, float amount) |
|
static Vector2 | ClampToRect (Vector2 position, Rect bounds) |
|
static void | FlipYZ (ref Bounds bounds) |
| Flips the coordinates for 2D mode More...
|
|
static Vector3 | FlipYZ (Vector3 bounds) |
| Flips the coordinates for 2D mode More...
|
|
static IntVector | FlipYZ (IntVector bounds) |
| Flips the coordinates for 2D mode More...
|
|
static void | Abs (ref Vector3 v) |
|
static void | Swap< T > (ref T a, ref T b) |
|
static void | Shuffle< T > (List< T > Array, System.Random Random) |
|
static void | Shuffle< T > (T[] Array, System.Random Random) |
|
static int[] | GetShuffledIndices (int Count, System.Random Random) |
|
static Bounds | TransformBounds (Matrix4x4 transform, Bounds bounds) |
|
static Bounds | TransformBoundsX (Matrix4x4 transform, Bounds localBounds) |
|
static bool | V3Equals (Vector3 a, Vector3 b) |
|
static bool | V3Equals (Vector3 a, Vector3 b, float threshold) |
|
static byte | ToByte (float value01) |
|
static Vector3 | ReflectVector (Vector3 direction, Vector3 normal) |
|
Various math utility functions
Definition at line 11 of file MathUtils.cs.