C# Class System.Windows.Forms.MathHelper

Show file Open project: Meragon/Unity-WinForms Class Usage Examples

Public Methods

Method Description
CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float
Clamp ( float value, float min, float max ) : float
Clamp ( int value, int min, int max ) : int
ColorLerp ( ColorF from, Color to, float speed ) : ColorF
DistanceD ( PointF p1, PointF p2 ) : double
DistanceD ( float x1, float y1, float x2, float y2 ) : double
DistanceF ( PointF p1, PointF p2 ) : float
DistanceF ( float value1, float value2 ) : float
DistanceF ( float x1, float y1, float x2, float y2 ) : float
FloatLerp ( float from_value, float to_value, float speed ) : float

Linear interpolation between two values.

Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float
InRange ( float val, float min, float max ) : bool
InRange ( int val, int min, int max ) : bool
SmoothStep ( float value1, float value2, float amount ) : float

Interpolates between two values using a cubic equation.

Step ( float from_value, float to_value, float speed ) : float

Method Details

CatmullRom() public static method

public static CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float
value1 float
value2 float
value3 float
value4 float
amount float
return float

Clamp() public static method

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

Clamp() public static method

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

ColorLerp() public static method

public static ColorLerp ( ColorF from, Color to, float speed ) : ColorF
from System.Drawing.ColorF
to Color
speed float
return System.Drawing.ColorF

DistanceD() public static method

public static DistanceD ( PointF p1, PointF p2 ) : double
p1 System.Drawing.PointF
p2 System.Drawing.PointF
return double

DistanceD() public static method

public static DistanceD ( float x1, float y1, float x2, float y2 ) : double
x1 float
y1 float
x2 float
y2 float
return double

DistanceF() public static method

public static DistanceF ( PointF p1, PointF p2 ) : float
p1 System.Drawing.PointF
p2 System.Drawing.PointF
return float

DistanceF() public static method

public static DistanceF ( float value1, float value2 ) : float
value1 float
value2 float
return float

DistanceF() public static method

public static DistanceF ( float x1, float y1, float x2, float y2 ) : float
x1 float
y1 float
x2 float
y2 float
return float

FloatLerp() public static method

Linear interpolation between two values.
public static FloatLerp ( float from_value, float to_value, float speed ) : float
from_value float
to_value float
speed float
return float

Hermite() public static method

public static Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float
value1 float
tangent1 float
value2 float
tangent2 float
amount float
return float

InRange() public static method

public static InRange ( float val, float min, float max ) : bool
val float
min float
max float
return bool

InRange() public static method

public static InRange ( int val, int min, int max ) : bool
val int
min int
max int
return bool

SmoothStep() public static method

Interpolates between two values using a cubic equation.
public static SmoothStep ( float value1, float value2, float amount ) : float
value1 float Source value.
value2 float Source value.
amount float Weighting value.
return float

Step() public static method

public static Step ( float from_value, float to_value, float speed ) : float
from_value float
to_value float
speed float
return float