Dungeon Architect  17.0.0
SharpNav.Geometry.Vector2i Struct Reference

A 2d vector represented by integers. More...

Inheritance diagram for SharpNav.Geometry.Vector2i:

Public Member Functions

 Vector2i (int x, int y)
 Initializes a new instance of the Vector2i struct with a specified coordinate. More...
 
override int GetHashCode ()
 Gets a unique hash code for this instance. More...
 
override string ToString ()
 Turns the instance into a human-readable string. More...
 
override bool Equals (object obj)
 Checks for equality between this instance and a specified object. More...
 
bool Equals (Vector2i other)
 Checks for equality between this instance and a specified instance of Vector2i. More...
 

Static Public Member Functions

static bool operator== (Vector2i left, Vector2i right)
 Compares two instances of Vector2i for equality. More...
 
static bool operator!= (Vector2i left, Vector2i right)
 Compares two instances of Vector2i for inequality. More...
 

Public Attributes

int X
 The X coordinate. More...
 
int Y
 The Y coordinate. More...
 

Static Public Attributes

static readonly Vector2i Min = new Vector2i(int.MinValue, int.MinValue)
 A vector where both X and Y are int.MinValue. More...
 
static readonly Vector2i Max = new Vector2i(int.MaxValue, int.MaxValue)
 A vector where both X and Y are int.MaxValue. More...
 
static readonly Vector2i Zero = new Vector2i(0, 0)
 A vector where both X and Y are 0. More...
 

Detailed Description

A 2d vector represented by integers.

Definition at line 12 of file Vector2i.cs.

Constructor & Destructor Documentation

◆ Vector2i()

SharpNav.Geometry.Vector2i.Vector2i ( int  x,
int  y 
)

Initializes a new instance of the Vector2i struct with a specified coordinate.

Parameters
xThe X coordinate.
yThe Y coordinate.

Definition at line 44 of file Vector2i.cs.

Member Function Documentation

◆ Equals() [1/2]

override bool SharpNav.Geometry.Vector2i.Equals ( object  obj)

Checks for equality between this instance and a specified object.

Parameters
objAn object.
Returns
A value indicating whether this instance and the object are equal.

Definition at line 96 of file Vector2i.cs.

◆ Equals() [2/2]

bool SharpNav.Geometry.Vector2i.Equals ( Vector2i  other)

Checks for equality between this instance and a specified instance of Vector2i.

Parameters
otherAn instance of Vector2i.
Returns
A value indicating whether this instance and the other instance are equal.

Definition at line 110 of file Vector2i.cs.

◆ GetHashCode()

override int SharpNav.Geometry.Vector2i.GetHashCode ( )

Gets a unique hash code for this instance.

Returns
A hash code.

Definition at line 76 of file Vector2i.cs.

◆ operator!=()

static bool SharpNav.Geometry.Vector2i.operator!= ( Vector2i  left,
Vector2i  right 
)
static

Compares two instances of Vector2i for inequality.

Parameters
leftAn instance of Vector2i.
rightAnother instance of Vector2i.
Returns
A value indicating whether the two instances are unequal.

Definition at line 67 of file Vector2i.cs.

◆ operator==()

static bool SharpNav.Geometry.Vector2i.operator== ( Vector2i  left,
Vector2i  right 
)
static

Compares two instances of Vector2i for equality.

Parameters
leftAn instance of Vector2i.
rightAnother instance of Vector2i.
Returns
A value indicating whether the two instances are equal.

Definition at line 56 of file Vector2i.cs.

◆ ToString()

override string SharpNav.Geometry.Vector2i.ToString ( )

Turns the instance into a human-readable string.

Returns
A string representing the instance.

Definition at line 86 of file Vector2i.cs.

Member Data Documentation

◆ Max

readonly Vector2i SharpNav.Geometry.Vector2i.Max = new Vector2i(int.MaxValue, int.MaxValue)
static

A vector where both X and Y are int.MaxValue.

Definition at line 22 of file Vector2i.cs.

◆ Min

readonly Vector2i SharpNav.Geometry.Vector2i.Min = new Vector2i(int.MinValue, int.MinValue)
static

A vector where both X and Y are int.MinValue.

Definition at line 17 of file Vector2i.cs.

◆ X

int SharpNav.Geometry.Vector2i.X

The X coordinate.

Definition at line 32 of file Vector2i.cs.

◆ Y

int SharpNav.Geometry.Vector2i.Y

The Y coordinate.

Definition at line 37 of file Vector2i.cs.

◆ Zero

readonly Vector2i SharpNav.Geometry.Vector2i.Zero = new Vector2i(0, 0)
static

A vector where both X and Y are 0.

Definition at line 27 of file Vector2i.cs.


The documentation for this struct was generated from the following file: