Represents a point relative to an origin in the top-left corner.
More...
|
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...
|
|
Represents a point relative to an origin in the top-left corner.
Definition at line 27 of file Point.cs.
◆ Point()
VectSharp.Point.Point |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Create a new Point.
- Parameters
-
x | The horizontal (x) coordinate. |
y | The vertical (y) coordinate. |
Definition at line 44 of file Point.cs.
◆ Bounds() [1/2]
static Rectangle VectSharp.Point.Bounds |
( |
IEnumerable< Point > |
points | ) |
|
|
static |
Computes the smallest Rectangle that contains all the specified points.
- Parameters
-
points | The points whose bounds are being computed. |
- Returns
- The smallest Rectangle that contains all the specified points.
Definition at line 107 of file Point.cs.
◆ Bounds() [2/2]
Computes the smallest Rectangle that contains all the specified points.
- Parameters
-
points | The points whose bounds are being computed. |
- Returns
- The smallest Rectangle that contains all the specified points.
Definition at line 136 of file Point.cs.
◆ IsEqual()
bool VectSharp.Point.IsEqual |
( |
Point |
p2, |
|
|
double |
tolerance |
|
) |
| |
Checks whether this Point is equal to another Point, up to a specified tolerance.
- Parameters
-
p2 | The Point to compare. |
tolerance | The tolerance threshold. |
- Returns
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.
Definition at line 75 of file Point.cs.
◆ Max()
Computes the bottom-right corner of the Rectangle identified by two Points.
- Parameters
-
p1 | The first point. |
p2 | The second point. |
- Returns
- A Point whose X coordinate is the largest between the one of p1 and p2 , and likewise for the Y coordinate.
Definition at line 97 of file Point.cs.
◆ Min()
Computes the top-left corner of the Rectangle identified by two Points.
- Parameters
-
p1 | The first point. |
p2 | The second point. |
- Returns
- A Point whose X coordinate is the smallest between the one of p1 and p2 , and likewise for the Y coordinate.
Definition at line 86 of file Point.cs.
◆ Modulus()
double VectSharp.Point.Modulus |
( |
| ) |
|
Computes the modulus of the vector represented by the Point.
- Returns
- The modulus of the vector represented by the Point.
Definition at line 54 of file Point.cs.
◆ Normalize()
Point VectSharp.Point.Normalize |
( |
| ) |
|
Horizontal (x) coordinate, measured to the right of the origin.
Definition at line 32 of file Point.cs.
Vertical (y) coordinate, measured to the bottom of the origin.
Definition at line 37 of file Point.cs.
The documentation for this struct was generated from the following file: