C# Class Revit.SDK.Samples.CreateBeamSystem.CS.MathUtil

utility class contains some methods deal with some general arithmetic
Afficher le fichier Open project: AMEE/revit

Méthodes publiques

Méthode Description
Add ( PointF f1, PointF f2 ) : PointF

add 2 vector

CompareDouble ( double d1, double d2 ) : bool

compare whether 2 double is equal using internal precision

Dot ( PointF pnt1, PointF pnt2 ) : float

dot multiply two vector

FindIntersection ( float u0, float u1, float v0, float v1, float &w ) : int

find and calculate the intersection of two interval [u0, u1] and [v0, v1]

GetMax ( float f1, float f2 ) : float

get the maximum value of 2 float

GetMin ( float f1, float f2 ) : float

get the minimum value of 2 float

Multiply ( float f, PointF pnt ) : PointF

multiply a float with a vector

Subtract ( PointF f1, PointF f2 ) : PointF

subtract 2 vector

Private Methods

Méthode Description
MathUtil ( ) : System

forbidden default constructor

Method Details

Add() public static méthode

add 2 vector
public static Add ( PointF f1, PointF f2 ) : PointF
f1 System.Drawing.PointF first vector
f2 System.Drawing.PointF second vector
Résultat System.Drawing.PointF

CompareDouble() public static méthode

compare whether 2 double is equal using internal precision
public static CompareDouble ( double d1, double d2 ) : bool
d1 double first value
d2 double second value
Résultat bool

Dot() public static méthode

dot multiply two vector
public static Dot ( PointF pnt1, PointF pnt2 ) : float
pnt1 System.Drawing.PointF first vector
pnt2 System.Drawing.PointF second vector
Résultat float

FindIntersection() public static méthode

find and calculate the intersection of two interval [u0, u1] and [v0, v1]
public static FindIntersection ( float u0, float u1, float v0, float v1, float &w ) : int
u0 float first interval
u1 float first interval
v0 float second interval
v1 float second interval
w float 2 intersections
Résultat int

GetMax() public static méthode

get the maximum value of 2 float
public static GetMax ( float f1, float f2 ) : float
f1 float first float
f2 float second float
Résultat float

GetMin() public static méthode

get the minimum value of 2 float
public static GetMin ( float f1, float f2 ) : float
f1 float first float
f2 float second float
Résultat float

Multiply() public static méthode

multiply a float with a vector
public static Multiply ( float f, PointF pnt ) : PointF
f float float value
pnt System.Drawing.PointF vector
Résultat System.Drawing.PointF

Subtract() public static méthode

subtract 2 vector
public static Subtract ( PointF f1, PointF f2 ) : PointF
f1 System.Drawing.PointF first vector
f2 System.Drawing.PointF second vector
Résultat System.Drawing.PointF