C# Class MyMaths

Afficher le fichier Open project: TomBBonin/UnityHelpers Class Usage Examples

Méthodes publiques

Méthode Description
ABCAreAligned2D ( Vector2 pointA, Vector2 pointB, Vector2 pointC, float epsilon ) : bool
DoSegmentsIntersect ( Vector2 segOneA, Vector2 segOneB, Vector2 segTwoA, Vector2 segTwoB ) : bool
GetEuclideanDistance ( Vector2 pointA, Vector2 pointB ) : float
GetSegmentCenter ( Vector2 segA, Vector2 segB ) : Vector2
GetSegmentNormalTowardsPos ( Vector2 segA, Vector2 segB, Vector2 pos ) : Vector2
GetSquaredDistance ( Vector2 pointA, Vector2 pointB ) : float
IsPointCBetweenAB2D ( Vector2 pointA, Vector2 pointB, Vector2 pointC, float epsilon ) : bool
IsPowerOfTwo ( int x ) : bool
IsPowerOfTwo ( ulong x ) : bool

Method Details

ABCAreAligned2D() public static méthode

public static ABCAreAligned2D ( Vector2 pointA, Vector2 pointB, Vector2 pointC, float epsilon ) : bool
pointA Vector2
pointB Vector2
pointC Vector2
epsilon float
Résultat bool

DoSegmentsIntersect() public static méthode

public static DoSegmentsIntersect ( Vector2 segOneA, Vector2 segOneB, Vector2 segTwoA, Vector2 segTwoB ) : bool
segOneA Vector2
segOneB Vector2
segTwoA Vector2
segTwoB Vector2
Résultat bool

GetEuclideanDistance() public static méthode

public static GetEuclideanDistance ( Vector2 pointA, Vector2 pointB ) : float
pointA Vector2
pointB Vector2
Résultat float

GetSegmentCenter() public static méthode

public static GetSegmentCenter ( Vector2 segA, Vector2 segB ) : Vector2
segA Vector2
segB Vector2
Résultat Vector2

GetSegmentNormalTowardsPos() public static méthode

public static GetSegmentNormalTowardsPos ( Vector2 segA, Vector2 segB, Vector2 pos ) : Vector2
segA Vector2
segB Vector2
pos Vector2
Résultat Vector2

GetSquaredDistance() public static méthode

public static GetSquaredDistance ( Vector2 pointA, Vector2 pointB ) : float
pointA Vector2
pointB Vector2
Résultat float

IsPointCBetweenAB2D() public static méthode

public static IsPointCBetweenAB2D ( Vector2 pointA, Vector2 pointB, Vector2 pointC, float epsilon ) : bool
pointA Vector2
pointB Vector2
pointC Vector2
epsilon float
Résultat bool

IsPowerOfTwo() public static méthode

public static IsPowerOfTwo ( int x ) : bool
x int
Résultat bool

IsPowerOfTwo() public static méthode

public static IsPowerOfTwo ( ulong x ) : bool
x ulong
Résultat bool