Click or drag to resize
Vector2I Structure
2-dimensional integer vector.

Namespace: Slash.Math.Algebra.Vectors
Assembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntax
[SerializableAttribute]
public struct Vector2I

The Vector2I type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyIsNonZero
Indicates if at least one vector component is not zero.
Public propertyIsZero
Indicates if all vector components are zero.
Public propertyMagnitude
Magnitude of the vector.
Public propertySquareMagnitude
Square magnitude of the vector.
Top
Methods
  NameDescription
Public methodStatic memberAbs
Returns a vector whose components represent the absolute values of the components of the specified vector.
Public methodAdd
Adds the passed values to the x and y value.
Public methodStatic memberArea
Returns a positive number if c is to the left of the line going from a to b.
Public methodStatic memberCalculateAngle
Calculates the angle between two vectors on a plane.
Public methodCalculateDotProduct
Calculates the dot product of this and the passed vector. See http://en.wikipedia.org/wiki/Dot_product for more details.
Public methodStatic memberCollinear(Vector2I, Vector2I, Vector2I)
Determines if three vectors are collinear (ie. on a straight line).
Public methodStatic memberCollinear(Vector2I, Vector2I, Vector2I, Single)
Determines if three vectors are collinear (ie. on a straight line).
Public methodStatic memberCross
Calculates the cross product of the two passed vectors. See http://en.wikipedia.org/wiki/Cross_product for more details.
Public methodStatic memberDistance
Returns the distance between the two passed vectors.
Public methodStatic memberDot
Calculates the dot product of the two passed vectors. See http://en.wikipedia.org/wiki/Dot_product for more details.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector2I)
Determines whether the specified Vector2I is equal to the current Vector2I.
Public methodGetDistance
Calculates the distance between this and the passed vector.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Overrides ValueTypeGetHashCode.)
Public methodGetPerpendicularVector
Returns a vector which is perpendicular to this vector.
Public methodGetSquareDistance
Calculates the square distance between this and the passed vector.
Public methodIsParallel
Checks if this vector is parallel or anti-parallel to the passed one.
Public methodStatic memberManhattanDistance
Sum of the absolute values of the differences of the components of both vectors.
Public methodStatic memberMax
Creates a new vector out of the two passed vectors and takes the maximum values from these for each component.
Public methodStatic memberMin
Creates a new vector out of the two passed vectors and takes the minimum values from these for each component.
Public methodToString
Returns a string that represents the current object.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Vector2I, Vector2I)
Sums the components of the passed vectors and returns the resulting vector.
Public operatorStatic memberAddition(Vector2I, Int32)
Adds the passed value to each component of the passed vector.
Public operatorStatic memberDivision
Divides each component of the passed vector by the passed value.
Public operatorStatic memberEquality
Indicates if the two passed vectors are equal.
Public operatorStatic memberInequality
Indicates if the two passed vectors are not equal.
Public operatorStatic memberMultiply(Int32, Vector2I)
Multiplies each vector component with the specified value.
Public operatorStatic memberMultiply(Single, Vector2I)
Multiplies each vector component with the specified value.
Public operatorStatic memberMultiply(Vector2I, Vector2I)
Multiplies each vector component of the two passed vectors.
Public operatorStatic memberMultiply(Vector2I, Int32)
Multiplies each vector component with the specified value.
Public operatorStatic memberMultiply(Vector2I, Single)
Multiplies each vector component with the specified value.
Public operatorStatic memberSubtraction(Vector2I, Vector2I)
Subtracts the components of the second passed vector from the first passed.
Public operatorStatic memberSubtraction(Vector2I, Int32)
Subtracts the passed value from each component of the passed vector.
Public operatorStatic memberUnaryNegation
Negates each component of the passed vector.
Top
Fields
  NameDescription
Public fieldStatic memberForward
Unrotated forward vector.
Public fieldStatic memberOne
Both vector components are 1.
Public fieldStatic memberSide
Unrotated side vector.
Public fieldStatic memberUnitX
X component is 1, Y component is 0.
Public fieldStatic memberUnitY
X component is 0, Y component is 1.
Public fieldX
X component.
Public fieldY
Y component.
Public fieldStatic memberZero
Both vector components are 0.
Top
Extension Methods
  NameDescription
Public Extension MethodToVector2
Converts the specified framework vector to an Unity vector.
(Defined by MathConversionExtensions.)
Public Extension MethodToVector2F
Converts a integer vector to a float vector.
(Defined by VectorExtensions.)
Top
See Also