Ignition / Math2DHelpers
Namespace
Playniax.IgnitionScript can be found in
Assets/Playniax/Framework/Ignition/Framework/Core/Scripts/Math2DHelpers.cs
Class Math2DHelpers
DescriptionCollection of 2D math functions.
Public Methods | Description |
---|
static float GetAngle(Vector3 a, Vector3 b) | Returns the angle between vector a & b. |
static float GetAngle(GameObject a, GameObject b) | Returns the angle between GameObject a & b. |
static float GetAngle360(Vector2 a, Vector2 b) | Returns the angle between vector a & b in degrees. |
static float GetAngle360(GameObject a, GameObject b) | Returns the angle between GameObject a & b in degrees. |
static bool Intersect(float cx, float cy, float radius, float x1, float y1, float x2, float y2) | Returns whether the line intersects with circle or not. |
static bool PointInsideRect(float pointX, float pointY, float x, float y, float width, float height, float pivotX = .5f, float pivotY = .5f) | Returns whether point is inside the rectangle or not. |