Ignition / Math2DHelpers

Namespace Playniax.Ignition

Class or component can be found in Assets/Playniax/Framework/Ignition/Framework/Scripts/Math2DHelpers.cs

Class Math2DHelpers

Description

Collection of 2d math functions.

Public MethodsDescription
static float GetAngle(GameObject a, GameObject b)Returns the angle between objects a & b.
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.