C# Class BananaMpq.MathUtil

Show file Open project: sgraf812/BananaMpq

Public Methods

Method Description
Clamp ( int value, int min, int max ) : int
Contains ( this rect, Vector2 v ) : bool
Contains ( this rect, Vector3 v ) : bool
Intersects ( this rect, BoundingBox box ) : bool
Transform ( this vertices, Matrix transform ) : IEnumerable
TriangleNormal ( Vector3 a, Vector3 b, Vector3 c ) : Vector3
Union ( this a, BoundingBox b ) : BoundingBox

Method Details

Clamp() public static method

public static Clamp ( int value, int min, int max ) : int
value int
min int
max int
return int

Contains() public static method

public static Contains ( this rect, Vector2 v ) : bool
rect this
v Vector2
return bool

Contains() public static method

public static Contains ( this rect, Vector3 v ) : bool
rect this
v Vector3
return bool

Intersects() public static method

public static Intersects ( this rect, BoundingBox box ) : bool
rect this
box BoundingBox
return bool

Transform() public static method

public static Transform ( this vertices, Matrix transform ) : IEnumerable
vertices this
transform Matrix
return IEnumerable

TriangleNormal() public static method

public static TriangleNormal ( Vector3 a, Vector3 b, Vector3 c ) : Vector3
a Vector3
b Vector3
c Vector3
return Vector3

Union() public static method

public static Union ( this a, BoundingBox b ) : BoundingBox
a this
b BoundingBox
return BoundingBox