|
Nebula
|
Describes a 2D-point.
Inherits IEquatable.
Public Member Functions | |
| Point (int x, int y) | |
| Constructs a point with X and Y from two values. | |
| Point (int value) | |
| Constructs a point with X and Y set to the same value. | |
| override bool | Equals (object obj) |
| Compares whether current instance is equal to specified Object. | |
| bool | Equals (Point other) |
| Compares whether current instance is equal to specified Point. | |
| override int | GetHashCode () |
| Gets the hash code of this Point. | |
| override string | ToString () |
| Returns a String representation of this Point in the format: {X:[X] Y:[Y]}. | |
| Vector2 | ToVector2 () |
| Gets a Vector2 representation for this object. | |
| void | Deconstruct (out int x, out int y) |
| Deconstruction method for Point. | |
Static Public Member Functions | |
| static Point | operator+ (Point value1, Point value2) |
| Adds two points. | |
| static Point | operator- (Point value1, Point value2) |
| Subtracts a Point from a Point. | |
| static Point | operator* (Point value1, Point value2) |
| Multiplies the components of two points by each other. | |
| static Point | operator/ (Point source, Point divisor) |
| Divides the components of a Point by the components of another Point. | |
| static bool | operator== (Point a, Point b) |
| Compares whether two Point instances are equal. | |
| static bool | operator!= (Point a, Point b) |
| Compares whether two Point instances are not equal. | |
Public Attributes | |
| int | X |
| The x coordinate of this Point. | |
| int | Y |
| The y coordinate of this Point. | |
Properties | |
| static Point | Zero [get] |
| Returns a Point with coordinates 0, 0. | |
| string | DebugDisplayString [get] |
Static Private Attributes | |
| static readonly Point | zeroPoint = new Point() |
|
inline |
Constructs a point with X and Y from two values.
| x | The x coordinate in 2d-space. |
| y | The y coordinate in 2d-space. |
|
inline |
Constructs a point with X and Y set to the same value.
| value | The x and y coordinates in 2d-space. |
|
inline |
Deconstruction method for Point.
| x | |
| y |
|
inline |
Compares whether current instance is equal to specified Object.
| obj | The Object to compare. |
true if the instances are equal; false otherwise.
|
inline |
Compares whether current instance is equal to specified Point.
| other | The Point to compare. |
true if the instances are equal; false otherwise.
|
inline |
Gets the hash code of this Point.
Compares whether two Point instances are not equal.
| a | Point instance on the left of the not equal sign. |
| b | Point instance on the right of the not equal sign. |
true if the instances are not equal; false otherwise.Multiplies the components of two points by each other.
| value1 | Source Point on the left of the mul sign. |
| value2 | Source Point on the right of the mul sign. |
Adds two points.
| value1 | Source Point on the left of the add sign. |
| value2 | Source Point on the right of the add sign. |
Subtracts a Point from a Point.
| value1 | Source Point on the left of the sub sign. |
| value2 | Source Point on the right of the sub sign. |
Divides the components of a Point by the components of another Point.
| source | Source Point on the left of the div sign. |
| divisor | Divisor Point on the right of the div sign. |
Compares whether two Point instances are equal.
| a | Point instance on the left of the equal sign. |
| b | Point instance on the right of the equal sign. |
true if the instances are equal; false otherwise.
|
inline |
Returns a String representation of this Point in the format: {X:[X] Y:[Y]}.
|
inline |
Gets a Vector2 representation for this object.
| int Mathf.Point.X |
The x coordinate of this Point.
| int Mathf.Point.Y |
The y coordinate of this Point.
|
getpackage |
|
staticget |
Returns a Point with coordinates 0, 0.