Method | Description | |
---|---|---|
Barycentric ( float value1, float value2, float value3, float amount1, float amount2 ) : float |
Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.
|
|
CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float |
Performs a Catmull-Rom interpolation using the specified positions.
|
|
Clamp ( float value, float min, float max ) : float |
Restricts a value to be within a specified range.
|
|
Clamp ( int value, int min, int max ) : int |
Restricts a value to be within a specified range.
|
|
Distance ( float value1, float value2 ) : float |
Calculates the absolute value of the difference of two values.
|
|
Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float |
Performs a Hermite spline interpolation.
|
|
IsPowerOfTwo ( int value ) : bool |
Determines if value is powered by two.
|
|
Lerp ( float value1, float value2, float amount ) : float |
Linearly interpolates between two values. This method performs the linear interpolation based on the following formula. |
|
Max ( float value1, float value2 ) : float |
Returns the greater of two values.
|
|
Min ( float value1, float value2 ) : float |
Returns the lesser of two values.
|
|
SmoothStep ( float value1, float value2, float amount ) : float |
Interpolates between two values using a cubic equation.
|
|
ToDegrees ( float radians ) : float |
Converts radians to degrees. This method uses double precission internally, though it returns single float Factor = 180 / pi |
|
ToRadians ( float degrees ) : float |
Converts degrees to radians. This method uses double precission internally, though it returns single float Factor = pi / 180 |
|
WrapAngle ( float angle ) : float |
Reduces a given angle to a value between π and -π.
|
public static Barycentric ( float value1, float value2, float value3, float amount1, float amount2 ) : float | ||
value1 | float | The coordinate on one axis of vertex 1 of the defining triangle. |
value2 | float | The coordinate on the same axis of vertex 2 of the defining triangle. |
value3 | float | The coordinate on the same axis of vertex 3 of the defining triangle. |
amount1 | float | The normalized barycentric (areal) coordinate b2, equal to the weighting factor for vertex 2, the coordinate of which is specified in value2. |
amount2 | float | The normalized barycentric (areal) coordinate b3, equal to the weighting factor for vertex 3, the coordinate of which is specified in value3. |
return | float |
public static CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float | ||
value1 | float | The first position in the interpolation. |
value2 | float | The second position in the interpolation. |
value3 | float | The third position in the interpolation. |
value4 | float | The fourth position in the interpolation. |
amount | float | Weighting factor. |
return | float |
public static Clamp ( float value, float min, float max ) : float | ||
value | float | The value to clamp. |
min | float | The minimum value. If |
max | float | The maximum value. If |
return | float |
public static Clamp ( int value, int min, int max ) : int | ||
value | int | The value to clamp. |
min | int | The minimum value. If |
max | int | The maximum value. If |
return | int |
public static Distance ( float value1, float value2 ) : float | ||
value1 | float | Source value. |
value2 | float | Source value. |
return | float |
public static Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float | ||
value1 | float | Source position. |
tangent1 | float | Source tangent. |
value2 | float | Source position. |
tangent2 | float | Source tangent. |
amount | float | Weighting factor. |
return | float |
public static IsPowerOfTwo ( int value ) : bool | ||
value | int | A value. |
return | bool |
public static Lerp ( float value1, float value2, float amount ) : float | ||
value1 | float | Source value. |
value2 | float | Source value. |
amount | float | Value between 0 and 1 indicating the weight of value2. |
return | float |
public static Max ( float value1, float value2 ) : float | ||
value1 | float | Source value. |
value2 | float | Source value. |
return | float |
public static Min ( float value1, float value2 ) : float | ||
value1 | float | Source value. |
value2 | float | Source value. |
return | float |
public static SmoothStep ( float value1, float value2, float amount ) : float | ||
value1 | float | Source value. |
value2 | float | Source value. |
amount | float | Weighting value. |
return | float |
public static ToDegrees ( float radians ) : float | ||
radians | float | The angle in radians. |
return | float |
public static ToRadians ( float degrees ) : float | ||
degrees | float | The angle in degrees. |
return | float |
public static WrapAngle ( float angle ) : float | ||
angle | float | The angle to reduce, in radians. |
return | float |