PointD Structure

Structure of double point.

Definition

Namespace: PCBI.MathUtils
Assembly: PCB-Investigator (in PCB-Investigator.exe) Version: 0
C#
public struct PointD
Inheritance
Object    ValueType    PointD

Constructors

PointD(PointF) Initialise the point with X and Y value as float.
PointD(Double, Double) Initialise the point with X and Y value.

Properties

IsEmpty both values are 0?
X X value of the Point.
Y Y value of the Point.

Methods

ConvertToMils Convert current point to new point with values in mil.
ConvertToMM Convert current point to new point with values in mm.
FromPoint New instance of double point form int point.
FromPointF Create a new point with double values form a point with float values.
IsInfPoint Both values are positive infinity.
IsPointEmpty Both values are 0? Can calculated with tolerance to ignore nearly 0 values.
SetFromPointF Sets point with double values form a point with float values.
ToPoint Change from double to int values.
ToPointF To get the values as floats.
ToPointF(Single) Change the value and multiply them with factor.
ToShortString(Int32) Create a short string with fix digit count e.g. digits = 3 returns {X=x.xxx, Y=y.yyy}.
ToShortString(Int32, Double) Create a short string with fix digit count e.g. digits = 3 returns {X=x.xxx, Y=y.yyy}.
ToString Override the ToString() method with values of this point with full double values.
(Overrides ValueTypeToString)

Operators

Addition(PointD, PointD) addition of two points.
Division(PointD, Double) Divided both values with one doubel.
Equality(PointD, PointD) Operator for equal.
Inequality(PointD, PointD) Operator not equal.
Multiply(Double, PointD) Calculates a new point with both values (X and Y) multiplied with one double value.
Multiply(PointD, Double) Calculates a new point with both values (X and Y) multiplied with one double value.
Subtraction(PointD, PointD) subtract right point from left point.

Fields

Empty Empty point with both values zero.
InfPoint Infinity point with both values Positive infinity.

Extension Methods

See Also