Structure representing a point in 2D space, usually expressed as pixel values.
More...
|
| | Point (int x, int y) |
| | Creates a new Point value with the specified coordinates.
|
| |
|
override bool | Equals ([NotNullWhen(true)] object? obj) |
| |
|
override int | GetHashCode () |
| |
|
override string | ToString () |
| |
|
bool | Equals (Point other) |
| |
|
| static Point | operator- (Point positive) |
| | Negate a point.
|
| |
| static bool | operator> (Point a, Point b) |
| | Compare two points to see if one is greater than the other.
|
| |
| static bool | operator< (Point a, Point b) |
| | Compare two points to see if one is less than the other.
|
| |
| static bool | operator>= (Point a, Point b) |
| | Compare two points to see if one is greater than or equal to the other.
|
| |
| static bool | operator<= (Point a, Point b) |
| | Compare two points to see if one is less than or equal the other.
|
| |
| static Point | operator* (Point left, int right) |
| | Multiply a point by the given value.
|
| |
| static Point | operator/ (Point left, int right) |
| | Divide one point by the given value.
|
| |
| static implicit | operator Vector2 (Point point) |
| | Implicit conversion from a Point to a Vector2.
|
| |
| static implicit | operator Point (Vector2 vector) |
| | Implicit conversion from a Vector2 to a Point. Floating-point values are truncated.
|
| |
| static bool | operator== (Point a, Point b) |
| | Checks if two Point values are equal.
|
| |
| static bool | operator!= (Point a, Point b) |
| | Checks if two Point values are not equal.
|
| |
| static Point | operator+ (Point a, Point b) |
| | Add two Point values together.
|
| |
| static Point | operator- (Point a, Point b) |
| | Subtract one point from another.
|
| |
| static Point | operator* (Point a, Point b) |
| | Multiply two points together.
|
| |
| static Point | operator/ (Point a, Point b) |
| | Divide one point by another.
|
| |
|
|
int | X |
| | The horizontal component of this point.
|
| |
|
int | Y |
| | The vertical component of this point.
|
| |
|
|
static readonly Point | Zero = new Point(0, 0) |
| | A Point value representing zero.
|
| |
|
|
float | Length [get] |
| | Gets the magnitude of the vector represented by this Point.
|
| |
Structure representing a point in 2D space, usually expressed as pixel values.
◆ Point()
Creates a new Point value with the specified coordinates.
- Parameters
-
| x | The horizontal coordinate of the point |
| y | The vertical component of the point |
◆ operator Point()
| static implicit operator Point |
( |
Vector2 | vector | ) |
|
|
inlinestatic |
Implicit conversion from a Vector2 to a Point. Floating-point values are truncated.
- Parameters
-
| vector | The Vector2 to convert. |
- Returns
- A Point representing the same coordinates.
◆ operator Vector2()
| static implicit operator Vector2 |
( |
Point | point | ) |
|
|
inlinestatic |
Implicit conversion from a Point to a Vector2.
- Parameters
-
| point | The Point to convert. |
- Returns
- A Vector2 representing the same coordinates.
◆ operator!=()
Checks if two Point values are not equal.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- False if equal, true otherwise
◆ operator*() [1/2]
Multiply two points together.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- A value representing the result of the multiplication.
◆ operator*() [2/2]
Multiply a point by the given value.
- Parameters
-
| left | Left side of the operation |
| right | Right side of the operation |
- Returns
- A value representing the result of the multiplication.
◆ operator+()
Add two Point values together.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- The result of the addition.
◆ operator-() [1/2]
Subtract one point from another.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- The result of the subtraction.
◆ operator-() [2/2]
Negate a point.
- Parameters
-
| positive | The point value to negate |
- Returns
- A point representing the negative of the given point
◆ operator/() [1/2]
Divide one point by another.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- A value representing the result of the division.
◆ operator/() [2/2]
Divide one point by the given value.
- Parameters
-
| left | Left side of the operation |
| right | Right side of the operation |
- Returns
- A value representing the result of the division.
◆ operator<()
Compare two points to see if one is less than the other.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- True if a is less than b.
◆ operator<=()
Compare two points to see if one is less than or equal the other.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- True if a is less than or equal to b.
◆ operator==()
Checks if two Point values are equal.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- True if equal, false otherwise
◆ operator>()
Compare two points to see if one is greater than the other.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- True if a is greater than b.
◆ operator>=()
Compare two points to see if one is greater than or equal to the other.
- Parameters
-
| a | Left side of the operation |
| b | Right side of the operation |
- Returns
- True if a is greater than or equal to b.
The documentation for this struct was generated from the following file:
- /builds/universe/graphics/src/Inertia.Platform/Point.cs