Struct Point2d
Represents a 2D point with double-precision floating-point coordinates.
Implements
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public struct Point2d : IEquatable<Point2d>
Constructors
| Improve this Doc View SourcePoint2d(Point)
Declaration
public Point2d(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The Point used to initialize this instance. |
Point2d(Double, Double)
Initializes a new instance of the Point2d structure from the specified coordinates.
Declaration
public Point2d(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
Double | x | The x-coordinate of the point. |
Double | y | The y-coordinate of the point. |
Fields
| Improve this Doc View SourceX
The x-coordinate of the point.
Declaration
public double X
Field Value
Type | Description |
---|---|
Double |
Y
The y-coordinate of the point.
Declaration
public double Y
Field Value
Type | Description |
---|---|
Double |
Properties
| Improve this Doc View SourceZero
Declaration
public static Point2d Zero { get; }
Property Value
Type | Description |
---|---|
Point2d |
Methods
| Improve this Doc View SourceEquals(Point2d)
Returns a value indicating whether this instance has the same coordinates as a specified Point2d structure.
Declaration
public bool Equals(Point2d other)
Parameters
Type | Name | Description |
---|---|---|
Point2d | other | The Point2d structure to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Tests to see whether the specified object is a Point2d structure with the same coordinates as this Point2d structure.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The |
Returns
Type | Description |
---|---|
Boolean | true if |
GetHashCode()
Returns a hash code for this Point2d structure.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | An integer value that specifies a hash value for this Point2d structure. |
ToString()
Creates a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
| Improve this Doc View SourceAddition(Point2d, Point2d)
Adds two Point2d structures.
Declaration
public static Point2d operator +(Point2d left, Point2d right)
Parameters
Type | Name | Description |
---|---|---|
Point2d | left | The Point2d structure on the left of the addition operator. |
Point2d | right | The Point2d structure on the right of the addition operator. |
Returns
Type | Description |
---|---|
Point2d | The Point2d that is the result of adding the |
Equality(Point2d, Point2d)
Tests whether two Point2d structures are equal.
Declaration
public static bool operator ==(Point2d left, Point2d right)
Parameters
Type | Name | Description |
---|---|---|
Point2d | left | The Point2d structure on the left of the equality operator. |
Point2d | right | The Point2d structure on the right of the equality operator. |
Returns
Type | Description |
---|---|
Boolean | true if |
Inequality(Point2d, Point2d)
Tests whether two Point2d structures are different.
Declaration
public static bool operator !=(Point2d left, Point2d right)
Parameters
Type | Name | Description |
---|---|---|
Point2d | left | The Point2d structure on the left of the inequality operator. |
Point2d | right | The Point2d structure on the right of the inequality operator. |
Returns
Type | Description |
---|---|
Boolean | true if |
Multiply(Point2d, Single)
Multiplies a Point2d structure by an integer scalar.
Declaration
public static Point2d operator *(Point2d point, float scalar)
Parameters
Type | Name | Description |
---|---|---|
Point2d | point | The Point2d structure to multiply by the |
Single | scalar | The scalar by which to multiply the |
Returns
Type | Description |
---|---|
Point2d | The Point2d that is the result of multiplying |
Multiply(Single, Point2d)
Multiplies a Point2d structure by an integer scalar.
Declaration
public static Point2d operator *(float scalar, Point2d point)
Parameters
Type | Name | Description |
---|---|---|
Single | scalar | The scalar by which to multiply the |
Point2d | point | The Point2d structure to multiply by the |
Returns
Type | Description |
---|---|
Point2d | The Point2d that is the result of multiplying |
Subtraction(Point2d, Point2d)
Subtracts two Point2d structures.
Declaration
public static Point2d operator -(Point2d left, Point2d right)
Parameters
Type | Name | Description |
---|---|---|
Point2d | left | The Point2d structure on the left of the subtraction operator. |
Point2d | right | The Point2d structure on the right of the subtraction operator. |
Returns
Type | Description |
---|---|
Point2d | The Point2d that is the result of subtracting the |
UnaryNegation(Point2d)
Returns the inversion with respect to the origin of the specified Point2d structure.
Declaration
public static Point2d operator -(Point2d point)
Parameters
Type | Name | Description |
---|---|---|
Point2d | point | The Point2d structure for which to compute the inversion. |
Returns
Type | Description |
---|---|
Point2d | The Point2d that is the result of inverting |