Class TrigMath
Inheritance
object
TrigMath
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InsaneScatterbrain
Syntax
public static class TrigMath
Methods
CalculateAllPointsWithinCircle(int, List<Vector2Int>)
Calculates all the integer points that lay within a circle of the given radios
Declaration
public static void CalculateAllPointsWithinCircle(int radius, List<Vector2Int> points)
Parameters
Type | Name | Description |
---|---|---|
int | radius | The circle's radius. |
System.Collections.Generic.List<T><UnityEngine.Vector2Int> | points | The list to fill with the calculated points. |
CalculateAllPointsWithinCircle(int)
Declaration
[Obsolete("This overload will likely be removed in version 2.0.")]
public static Vector2Int[] CalculateAllPointsWithinCircle(int radius)
Parameters
Type | Name | Description |
---|---|---|
int | radius |
Returns
Type | Description |
---|---|
UnityEngine.Vector2Int[] |
IsPointInRectangle(Vector2Int, Vector2Int, Vector2Int, Vector2Int, Vector2Int)
Checks whether point p lays within a rectangle made up by point p0, p1, p2 and p3.
Declaration
public static bool IsPointInRectangle(Vector2Int point, Vector2Int p0, Vector2Int p1, Vector2Int p2, Vector2Int p3)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector2Int | point | The point to check if it lays within the rectangle. |
UnityEngine.Vector2Int | p0 | The first rectangle corner point. |
UnityEngine.Vector2Int | p1 | The second rectangle corner point. |
UnityEngine.Vector2Int | p2 | The third rectangle corner point. |
UnityEngine.Vector2Int | p3 | The fourth rectangle corner point. |
Returns
Type | Description |
---|---|
bool |
IsPointInTriangle(Vector2Int, Vector2Int, Vector2Int, Vector2Int)
Checks whether point p lays within the triangle made up by point p0, p1 and p2.
Declaration
public static bool IsPointInTriangle(Vector2Int p, Vector2Int p0, Vector2Int p1, Vector2Int p2)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector2Int | p | The point to check if it lays within the triangle. |
UnityEngine.Vector2Int | p0 | The first triangle corner point. |
UnityEngine.Vector2Int | p1 | The second triangle corner point. |
UnityEngine.Vector2Int | p2 | The third triangle corner point. |
Returns
Type | Description |
---|---|
bool |