Fields

x The X component of this integer vector.
y The Y component of this integer vector.

Properties

Degrees Return the angle of this vector in degrees, always between 0 and 360.
IsZeroLength Whether the length of this vector is zero or not.
Item
Length Length (or magnitude) of the integer vector (Distance from 0,0)
LengthSquared Squared length of the integer vector. This is faster than <see cref="P:Vector2Int.Length">Length</see>, and can be used for things like comparing distances, as long as only squared values are used."/&gt;
Normal Returns a unit version of this vector. Keep in mind this returns a Vector2 and not a Vector2Int.
Perpendicular Returns an integer vector that runs perpendicular to this one.

Methods

Abs Returns a new integer vector with all values positive. -5 becomes 5, ect.
ComponentMax
ComponentMin
Distance
IsNearlyZero
Read
SnapToGrid
WithX
WithY
Write

Static Fields

Down An integer vector with Y set to -1. This represents the down direction.
Left An integer vector with X set to -1. This represents the left direction.
One An integer vector with all components set to 1.
Right An integer vector with X set to 1. This represents the right direction.
Up An integer vector with Y set to 1. This represents the up direction.
Zero An integer vector with all components set to 0.

Static Methods

Max
Min
Parse
TryParse
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.