|
VectSharp 2.6.1
A light library for C# vector graphics
|
Represents a point relative to an origin in the top-left corner. More...

Public Member Functions | |
| Point (double x, double y) | |
| Create a new Point. More... | |
| double | Modulus () |
| Computes the modulus of the vector represented by the Point. More... | |
| Point | Normalize () |
| Normalises a Point. More... | |
| bool | IsEqual (Point p2, double tolerance) |
| Checks whether this Point is equal to another Point, up to a specified tolerance. More... | |
| IEnumerator< double > | GetEnumerator () |
| IEnumerator IEnumerable. | GetEnumerator () |
Static Public Member Functions | |
| static Point | Min (Point p1, Point p2) |
| Computes the top-left corner of the Rectangle identified by two Points. More... | |
| static Point | Max (Point p1, Point p2) |
| Computes the bottom-right corner of the Rectangle identified by two Points. More... | |
| static Rectangle | Bounds (IEnumerable< Point > points) |
| Computes the smallest Rectangle that contains all the specified points. More... | |
| static Rectangle | Bounds (params Point[] points) |
| Computes the smallest Rectangle that contains all the specified points. More... | |
| static implicit | operator (double X, double Y)(Point point) |
| Implicit conversion to a tuple. More... | |
| static implicit | operator double[] (Point point) |
| Implicit conversion to an array. More... | |
| static implicit | operator Point ((double X, double Y) tuple) |
| Implicit conversion from a tuple. More... | |
| static | operator Point (double[] array) |
| Explicit conversion from an array (will throw an exception if the array does not contain exactly two elements). More... | |
| static Point | operator- (Point p1, Point p2) |
| Subtract the coordinates of two points. More... | |
| static Point | operator+ (Point p1, Point p2) |
| Add the coordinates of two points. More... | |
| static Point | operator* (double t, Point p) |
| Multiply the coordinates of a point by a scalar. More... | |
| static Point | operator* (Point p, double t) |
| Multiply the coordinates of a point by a scalar. More... | |
Public Attributes | |
| double | X |
| Horizontal (x) coordinate, measured to the right of the origin. More... | |
| double | Y |
| Vertical (y) coordinate, measured to the bottom of the origin. More... | |
Properties | |
| int | Count [get] |
| double | this[int index] [get] |
Represents a point relative to an origin in the top-left corner.
| VectSharp.Point.Point | ( | double | x, |
| double | y | ||
| ) |
| bool VectSharp.Point.IsEqual | ( | Point | p2, |
| double | tolerance | ||
| ) |
Checks whether this Point is equal to another Point, up to a specified tolerance.
| p2 | The Point to compare. |
| tolerance | The tolerance threshold. |
true if both coordinates of the Points are closer than tolerance or if their relative difference (i.e. (a - b) / (a + b) * 2) is smaller than tolerance . false otherwise.| double VectSharp.Point.Modulus | ( | ) |
| Point VectSharp.Point.Normalize | ( | ) |
|
static |
|
static |
|
static |
|
explicitstatic |
|
static |
|
static |
|
static |
|
static |
| double VectSharp.Point.X |
| double VectSharp.Point.Y |