Beef Corlib
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
System.Math Class Reference

This class provides general Math functionality. More...

Public Member Functions

static float Acos (float f)
 
static double Acos (double d)
 
static float Asin (float f)
 
static double Asin (double d)
 
static float Atan (float f)
 
static double Atan (double d)
 
static float Atan2 (float y, float x)
 
static double Atan2 (double y, double x)
 
static float Ceiling (float f)
 
static double Ceiling (double a)
 
static float Cos (float f)
 Returns cosine.
 
static double Cos (double d)
 
static float Cosh (float f)
 
static double Cosh (double d)
 
static float Floor (float f)
 
static double Floor (double d)
 
static float Sin (float f)
 
static double Sin (double a)
 
static float Tan (float f)
 
static double Tan (double a)
 
static float Sinh (float f)
 
static double Sinh (double value)
 
static float Tanh (float f)
 
static double Tanh (double value)
 
static float Round (float f)
 
static double Round (double a)
 
static float Sqrt (float f)
 
static double Sqrt (double d)
 
static float Log (float f)
 
static double Log (double d)
 
static float Log10 (float f)
 
static double Log10 (double d)
 
static float Exp (float f)
 
static double Exp (double d)
 
static float Pow (float x, float y)
 
static double Pow (double x, double y)
 
static float Abs (float value)
 
static double Abs (double value)
 

Static Public Member Functions

static bool WithinEpsilon (float a, float b)
 
static float Round (float value, int32 digits)
 
static double Round (double value, int32 digits)
 
static float Round (float value, MidpointRounding mode)
 
static double Round (double value, MidpointRounding mode)
 
static float Round (float value, int32 digits, MidpointRounding mode)
 
static double Round (double value, int32 digits, MidpointRounding mode)
 
static float Truncate (float f)
 
static double Truncate (double d)
 
static float IEEERemainder (float x, float y)
 
static double IEEERemainder (double x, double y)
 
static T Abs< T > (T value)
 
static T Clamp< T > (T val, T min, T max)
 
static float Distance (float dX, float dY)
 
static float Lerp (float val1, float val2, float pct)
 
static double Lerp (double val1, double val2, double pct)
 
static T Lerp< T > (T val1, T val2, float pct)
 
static T Lerp< T > (T val1, T val2, double pct)
 
static T Min< T > (T val1, T val2)
 
static T Min< T > (T val1, T val2)
 
static T Max< T > (T val1, T val2)
 
static T Max< T > (T val1, T val2)
 
static float Log (float a, float newBase)
 
static double Log (double a, double newBase)
 
static int Sign< T > (T value)
 
static int Sign< T > (T value)
 
static int32 DivRem (int32 a, int32 b, out int32 result)
 
static int64 DivRem (int64 a, int64 b, out int64 result)
 
static int32 Align (int32 val, int32 align)
 
static int64 Align (int64 val, int64 align)
 
static float SmoothStep (float value1, float value2, float amount)
 Interpolates between two values using a cubic equation. More...
 
static float Hermite (float value1, float tangent1, float value2, float tangent2, float amount)
 Performs a Hermite spline interpolation. More...
 
static float Barycentric (float value1, float value2, float value3, float amount1, float amount2)
 Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates. More...
 
static float CatmullRom (float value1, float value2, float value3, float value4, float amount)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 

Static Public Attributes

const double PI_d = 3.14159265358979323846
 
const double E_d = 2.7182818284590452354
 
const float PI_f = 3.14159265358979323846f
 
const float E_f = 2.7182818284590452354f
 

Detailed Description

This class provides general Math functionality.

Member Function Documentation

◆ Barycentric()

static float System.Math.Barycentric ( float  value1,
float  value2,
float  value3,
float  amount1,
float  amount2 
)
inlinestatic

Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.

Parameters
value1The coordinate on one axis of vertex 1 of the defining triangle.
value2The coordinate on the same axis of vertex 2 of the defining triangle.
value3The coordinate on the same axis of vertex 3 of the defining triangle.
amount1The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2.
amount2The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3.
Returns
Cartesian coordinate of the specified point with respect to the axis being used.

◆ CatmullRom()

static float System.Math.CatmullRom ( float  value1,
float  value2,
float  value3,
float  value4,
float  amount 
)
inlinestatic

Performs a Catmull-Rom interpolation using the specified positions.

Parameters
value1The first position in the interpolation.
value2">Thesecond position in the interpolation.
value3">Thethird position in the interpolation.
value4">Thefourth position in the interpolation.
name="amount">Weightingfactor.
Returns
A position that is the result of the Catmull-Rom interpolation.

◆ Hermite()

static float System.Math.Hermite ( float  value1,
float  tangent1,
float  value2,
float  tangent2,
float  amount 
)
inlinestatic

Performs a Hermite spline interpolation.

Parameters
value1Source position.
tangent1Source tangent.
value2Source position.
tangent2Source tangent.
amountWeighting factor.
Returns
The result of the Hermite spline interpolation.

◆ SmoothStep()

static float System.Math.SmoothStep ( float  value1,
float  value2,
float  amount 
)
inlinestatic

Interpolates between two values using a cubic equation.

Parameters
nameSource value.
nameSource value.
nameWeighting value.
Returns
Interpolated value.