C# Класс LitDev.LDMath

Показать файл Открыть проект

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

Метод Описание
ArcCos ( Primitive cos ) : Primitive

ArcCos in degrees.

ArcSin ( Primitive sin ) : Primitive

ArcSin in degrees.

ArcTan ( Primitive tan ) : Primitive

ArcTan in degrees.

Base2Decimal ( Primitive number, Primitive Base ) : Primitive

Convert a base number to a decimal integer.

Convert2Cartesian ( Primitive x1, Primitive y1, Primitive dist, Primitive angle ) : Primitive

Calculate the coordinates of a point 2, from point 1 and the distance and angle to point 2.

Convert2Radial ( Primitive x1, Primitive y1, Primitive x2, Primitive y2 ) : Primitive

Calculate the distance and angle between two points.

Cos ( Primitive angle ) : Primitive

Cos of an angle in degrees.

Cosh ( Primitive angle ) : Primitive

Hyperbolic cosine.

Decimal2Base ( Primitive number, Primitive Base ) : Primitive

Convert a decimal integer to another base.

Evaluate ( Primitive expression ) : Primitive

Evaluate a string expression to a number or boolean (if possible). The JScript command 'eval' is used and may therefore allow more complex JScript manipulations (also see LDInline). The TextWindow should be visible prior to using this method if later use of the TextWindow is required.

Evaluate2 ( Primitive expression ) : Primitive

Evaluate a string expression to a number (if possible). An alternative to Evaluate that behaves nicely with the TextWindow.

Evaluate3 ( Primitive expression ) : Primitive

Evaluate a string expression to a boolean "True" or "False" (if possible). An alternative to Evaluate that behaves nicely with the TextWindow.

Exp ( Primitive value ) : Primitive

Exponential of a number e^x.

FixDecimal ( Primitive number, Primitive digits ) : Primitive

Round a number to a fixed number of decimal places. Additional training decimal 0s are added if required.

FixSigFig ( Primitive number, Primitive digits ) : Primitive

Round a number to a fixed number of significant figures.

Rotate ( Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive angle ) : Primitive

Rotate point 2 clockwise about point 1.

Sin ( Primitive angle ) : Primitive

Sin of an angle in degrees.

Sinh ( Primitive angle ) : Primitive

Hyperbolic sine.

Tan ( Primitive angle ) : Primitive

Tan of an angle in degrees.

Tanh ( Primitive angle ) : Primitive

Hyperbolic tangent.

Truncate ( Primitive value ) : Primitive

Get the integral part of a number.

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

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

ArcCos in degrees.
public static ArcCos ( Primitive cos ) : Primitive
cos Primitive /// The Cos of the angle. ///
Результат Primitive

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

ArcSin in degrees.
public static ArcSin ( Primitive sin ) : Primitive
sin Primitive /// The Sin of the angle. ///
Результат Primitive

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

ArcTan in degrees.
public static ArcTan ( Primitive tan ) : Primitive
tan Primitive /// The Tan of the angle. ///
Результат Primitive

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

Convert a base number to a decimal integer.
public static Base2Decimal ( Primitive number, Primitive Base ) : Primitive
number Primitive The base number to convert (non negative).
Base Primitive The base to convert from (2 binary) (8 octal) (16 hex) or other bases up to 36.
Результат Primitive

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

Calculate the coordinates of a point 2, from point 1 and the distance and angle to point 2.
public static Convert2Cartesian ( Primitive x1, Primitive y1, Primitive dist, Primitive angle ) : Primitive
x1 Primitive /// The X coordinate of point 1. ///
y1 Primitive /// The Y coordinate of point 1. ///
dist Primitive /// The distance to point 2. ///
angle Primitive /// The angle to point 2 in degrees. ///
Результат Primitive

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

Calculate the distance and angle between two points.
public static Convert2Radial ( Primitive x1, Primitive y1, Primitive x2, Primitive y2 ) : Primitive
x1 Primitive /// The X coordinate of point 1. ///
y1 Primitive /// The Y coordinate of point 1. ///
x2 Primitive /// The X coordinate of point 2. ///
y2 Primitive /// The Y coordinate of point 2. ///
Результат Primitive

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

Cos of an angle in degrees.
public static Cos ( Primitive angle ) : Primitive
angle Primitive /// The angle in degrees. ///
Результат Primitive

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

Hyperbolic cosine.
public static Cosh ( Primitive angle ) : Primitive
angle Primitive Angle in radians.
Результат Primitive

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

Convert a decimal integer to another base.
public static Decimal2Base ( Primitive number, Primitive Base ) : Primitive
number Primitive The decimal integer to convert (non negative).
Base Primitive The base to convert to (2 binary) (8 octal) (16 hex) or other bases to 36.
Результат Primitive

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

Evaluate a string expression to a number or boolean (if possible). The JScript command 'eval' is used and may therefore allow more complex JScript manipulations (also see LDInline). The TextWindow should be visible prior to using this method if later use of the TextWindow is required.
public static Evaluate ( Primitive expression ) : Primitive
expression Primitive The expression to evaluate, e.g. "(9/6) + 3" or "2.1 > 1.5".
Результат Primitive

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

Evaluate a string expression to a number (if possible). An alternative to Evaluate that behaves nicely with the TextWindow.
public static Evaluate2 ( Primitive expression ) : Primitive
expression Primitive The expression to evaluate, e.g. "1e6 + 6/4".
Результат Primitive

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

Evaluate a string expression to a boolean "True" or "False" (if possible). An alternative to Evaluate that behaves nicely with the TextWindow.
public static Evaluate3 ( Primitive expression ) : Primitive
expression Primitive The expression to evaluate to a boolean, e.g. "21.3 > 16".
Результат Primitive

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

Exponential of a number e^x.
public static Exp ( Primitive value ) : Primitive
value Primitive The value to raise e to the power of.
Результат Primitive

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

Round a number to a fixed number of decimal places. Additional training decimal 0s are added if required.
public static FixDecimal ( Primitive number, Primitive digits ) : Primitive
number Primitive The number to change.
digits Primitive The number of decimal places.
Результат Primitive

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

Round a number to a fixed number of significant figures.
public static FixSigFig ( Primitive number, Primitive digits ) : Primitive
number Primitive The number to change.
digits Primitive The number of significant figures.
Результат Primitive

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

Rotate point 2 clockwise about point 1.
public static Rotate ( Primitive x1, Primitive y1, Primitive x2, Primitive y2, Primitive angle ) : Primitive
x1 Primitive /// The X coordinate of point 1. ///
y1 Primitive /// The Y coordinate of point 1. ///
x2 Primitive /// The X coordinate of point 2. ///
y2 Primitive /// The Y coordinate of point 2. ///
angle Primitive /// The angle to rotate point 2 around point 1 in degrees. ///
Результат Primitive

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

Sin of an angle in degrees.
public static Sin ( Primitive angle ) : Primitive
angle Primitive /// The angle in degrees. ///
Результат Primitive

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

Hyperbolic sine.
public static Sinh ( Primitive angle ) : Primitive
angle Primitive Angle in radians.
Результат Primitive

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

Tan of an angle in degrees.
public static Tan ( Primitive angle ) : Primitive
angle Primitive /// The angle in degrees. ///
Результат Primitive

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

Hyperbolic tangent.
public static Tanh ( Primitive angle ) : Primitive
angle Primitive Angle in radians.
Результат Primitive

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

Get the integral part of a number.
public static Truncate ( Primitive value ) : Primitive
value Primitive The number to truncate.
Результат Primitive