C# Class Accord.DoublePoint

Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Свойство Type Description
X double
Y double

Méthodes publiques

Méthode Description
Add ( DoublePoint point1, DoublePoint point2 ) : DoublePoint

Addition operator - adds values of two points.

Add ( DoublePoint point, double valueToAdd ) : DoublePoint

Addition operator - adds scalar to the specified point.

DistanceTo ( DoublePoint anotherPoint ) : double

Calculate Euclidean distance between two points.

Divide ( DoublePoint point, double factor ) : DoublePoint

Division operator - divides coordinates of the specified point by scalar value.

DoublePoint ( double x, double y ) : System

Initializes a new instance of the DoublePoint structure.

Equals ( object obj ) : bool

Check if this instance of DoublePoint equal to the specified one.

EuclideanNorm ( ) : double

Calculate Euclidean norm of the vector comprised of the point's coordinates - distance from (0, 0) in other words.

GetHashCode ( ) : int

Get hash code for this instance.

Multiply ( DoublePoint point, double factor ) : DoublePoint

Multiplication operator - multiplies coordinates of the specified point by scalar value.

Round ( ) : IntPoint

Rounds the double precision point.

SquaredDistanceTo ( DoublePoint anotherPoint ) : double

Calculate squared Euclidean distance between two points.

Subtract ( DoublePoint point1, DoublePoint point2 ) : DoublePoint

Subtraction operator - subtracts values of two points.

Subtract ( DoublePoint point, double valueToSubtract ) : DoublePoint

Subtraction operator - subtracts scalar from the specified point.

ToString ( ) : string

Get string representation of the class.

operator ( ) : DoublePoint

Addition operator - adds values of two points.

operator ( ) : bool

Equality operator - checks if two points have equal coordinates.

Method Details

Add() public static méthode

Addition operator - adds values of two points.
public static Add ( DoublePoint point1, DoublePoint point2 ) : DoublePoint
point1 DoublePoint First point for addition.
point2 DoublePoint Second point for addition.
Résultat DoublePoint

Add() public static méthode

Addition operator - adds scalar to the specified point.
public static Add ( DoublePoint point, double valueToAdd ) : DoublePoint
point DoublePoint Point to increase coordinates of.
valueToAdd double Value to add to coordinates of the specified point.
Résultat DoublePoint

DistanceTo() public méthode

Calculate Euclidean distance between two points.
public DistanceTo ( DoublePoint anotherPoint ) : double
anotherPoint DoublePoint Point to calculate distance to.
Résultat double

Divide() public static méthode

Division operator - divides coordinates of the specified point by scalar value.
public static Divide ( DoublePoint point, double factor ) : DoublePoint
point DoublePoint Point to divide coordinates of.
factor double Division factor.
Résultat DoublePoint

DoublePoint() public méthode

Initializes a new instance of the DoublePoint structure.
public DoublePoint ( double x, double y ) : System
x double X axis coordinate.
y double Y axis coordinate.
Résultat System

Equals() public méthode

Check if this instance of DoublePoint equal to the specified one.
public Equals ( object obj ) : bool
obj object Another point to check equalty to.
Résultat bool

EuclideanNorm() public méthode

Calculate Euclidean norm of the vector comprised of the point's coordinates - distance from (0, 0) in other words.
public EuclideanNorm ( ) : double
Résultat double

GetHashCode() public méthode

Get hash code for this instance.
public GetHashCode ( ) : int
Résultat int

Multiply() public static méthode

Multiplication operator - multiplies coordinates of the specified point by scalar value.
public static Multiply ( DoublePoint point, double factor ) : DoublePoint
point DoublePoint Point to multiply coordinates of.
factor double Multiplication factor.
Résultat DoublePoint

Round() public méthode

Rounds the double precision point.
public Round ( ) : IntPoint
Résultat IntPoint

SquaredDistanceTo() public méthode

Calculate squared Euclidean distance between two points.
public SquaredDistanceTo ( DoublePoint anotherPoint ) : double
anotherPoint DoublePoint Point to calculate distance to.
Résultat double

Subtract() public static méthode

Subtraction operator - subtracts values of two points.
public static Subtract ( DoublePoint point1, DoublePoint point2 ) : DoublePoint
point1 DoublePoint Point to subtract from.
point2 DoublePoint Point to subtract.
Résultat DoublePoint

Subtract() public static méthode

Subtraction operator - subtracts scalar from the specified point.
public static Subtract ( DoublePoint point, double valueToSubtract ) : DoublePoint
point DoublePoint Point to decrease coordinates of.
valueToSubtract double Value to subtract from coordinates of the specified point.
Résultat DoublePoint

ToString() public méthode

Get string representation of the class.
public ToString ( ) : string
Résultat string

operator() public static méthode

Addition operator - adds values of two points.
public static operator ( ) : DoublePoint
Résultat DoublePoint

operator() public static méthode

Equality operator - checks if two points have equal coordinates.
public static operator ( ) : bool
Résultat bool

Property Details

X public_oe property

X coordinate.
public double X
Résultat double

Y public_oe property

Y coordinate.
public double Y
Résultat double