C# Класс WinRTXamlToolkit.Tools.MathEx

Extension methods that help simplify some math operations.
Показать файл Открыть проект

Открытые методы

Метод Описание
Clamp ( this @value, double min, double max ) : double

Returns the value limited by the range of min..max.

If either min or max are double.NaN - they are not limiting the range.

Distance ( this lv, double rv ) : double

Returns the distance between this and right value.

Lerp ( double start, double end, double progress ) : double

Returns linear interpolation between start and end values at position specified as 0..1 range value.

Max ( this lv, double rv ) : double

Returns the maximum of this and right value.

Min ( this lv, double rv ) : double

Returns the minimum of this and right value.

Описание методов

Clamp() публичный статический Метод

Returns the value limited by the range of min..max.
If either min or max are double.NaN - they are not limiting the range.
public static Clamp ( this @value, double min, double max ) : double
@value this
min double The range minimum.
max double The range maximum.
Результат double

Distance() публичный статический Метод

Returns the distance between this and right value.
public static Distance ( this lv, double rv ) : double
lv this The left value.
rv double The right value.
Результат double

Lerp() публичный статический Метод

Returns linear interpolation between start and end values at position specified as 0..1 range value.
public static Lerp ( double start, double end, double progress ) : double
start double The start value.
end double The end value.
progress double The progress between start and end values /// where for progress value of 0 - the start value is returned and for 1 - the right value is returned.
Результат double

Max() публичный статический Метод

Returns the maximum of this and right value.
public static Max ( this lv, double rv ) : double
lv this The left value.
rv double The right value.
Результат double

Min() публичный статический Метод

Returns the minimum of this and right value.
public static Min ( this lv, double rv ) : double
lv this The left value.
rv double The right value.
Результат double