C# Класс NPlot.Utils

General purpose utility functions used internally.
Показать файл Открыть проект

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

Метод Описание
ArrayMinMax ( IList a, double &min, double &max ) : bool

Returns the minimum and maximum values in an IList. The members of the list can be of different types - any type for which the function Utils.ConvertToDouble knows how to convert into a double.

Distance ( PointF a, PointF b ) : float

Calculate the distance between two points, a and b.

Distance ( Point a, Point b ) : int

Calculate the distance between two points, a and b.

DoubleEqual ( double a, double b ) : bool

Returns true if the absolute difference between parameters is less than Epsilon

ScaleFont ( Font initial, double scale ) : Font

Get a Font exactly the same as the passed in one, except for scale factor.

Swap ( double &a, double &b ) : void

Swaps the value of two doubles.

UnitVector ( PointF a, PointF b ) : PointF

Returns unit vector along the line a->b.

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

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

Returns the minimum and maximum values in an IList. The members of the list can be of different types - any type for which the function Utils.ConvertToDouble knows how to convert into a double.
public static ArrayMinMax ( IList a, double &min, double &max ) : bool
a IList The IList to search.
min double The minimum value.
max double The maximum value.
Результат bool

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

Calculate the distance between two points, a and b.
public static Distance ( PointF a, PointF b ) : float
a System.Drawing.PointF First point
b System.Drawing.PointF Second point
Результат float

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

Calculate the distance between two points, a and b.
public static Distance ( Point a, Point b ) : int
a Point First point
b Point Second point
Результат int

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

Returns true if the absolute difference between parameters is less than Epsilon
public static DoubleEqual ( double a, double b ) : bool
a double first number to compare
b double second number to compare
Результат bool

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

Get a Font exactly the same as the passed in one, except for scale factor.
public static ScaleFont ( Font initial, double scale ) : Font
initial System.Drawing.Font The font to scale.
scale double Scale by this factor.
Результат System.Drawing.Font

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

Swaps the value of two doubles.
public static Swap ( double &a, double &b ) : void
a double first value to swap.
b double second value to swap.
Результат void

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

Returns unit vector along the line a->b.
public static UnitVector ( PointF a, PointF b ) : PointF
a System.Drawing.PointF line start point.
b System.Drawing.PointF line end point.
Результат System.Drawing.PointF