# Vector2 Структура

## Определение

Represents a vector with two single-precision floating-point values.Represents a vector with two single-precision floating-point values.

``public value class Vector2 : IEquatable<System::Numerics::Vector2>, IFormattable``
``public struct Vector2 : IEquatable<System.Numerics.Vector2>, IFormattable``
``````type Vector2 = struct
interface IFormattable``````
``````Public Structure Vector2
Implements IEquatable(Of Vector2), IFormattable``````
Наследование
Vector2
Реализации

## Комментарии

Структура Vector2 обеспечивает поддержку аппаратного ускорения.The Vector2 structure provides support for hardware acceleration.

В матричных преобразованиях экземпляры Vector2, Vector3 и Vector4 отображаются в виде строк: вектор v преобразуется матрицей M с помощью умножения vM.For matrix transformations, the Vector2, Vector3, and Vector4 instances are represented as rows: a vector v is transformed by a matrix M with vM multiplication.

## Конструкторы

 Creates a new Vector2 object whose two elements have the same value.Creates a new Vector2 object whose two elements have the same value. Creates a vector whose elements have the specified values.Creates a vector whose elements have the specified values.

## Поля

 The X component of the vector.The X component of the vector. The Y component of the vector.The Y component of the vector.

## Свойства

 Gets a vector whose 2 elements are equal to one.Gets a vector whose 2 elements are equal to one. Gets the vector (1,0).Gets the vector (1,0). Gets the vector (0,1).Gets the vector (0,1). Returns a vector whose 2 elements are equal to zero.Returns a vector whose 2 elements are equal to zero.

## Методы

 Returns a vector whose elements are the absolute values of each of the specified vector's elements.Returns a vector whose elements are the absolute values of each of the specified vector's elements. Adds two vectors together.Adds two vectors together. Restricts a vector between a minimum and a maximum value.Restricts a vector between a minimum and a maximum value. Copies the elements of the vector to a specified array.Copies the elements of the vector to a specified array. Copies the elements of the vector to a specified array starting at a specified index position.Copies the elements of the vector to a specified array starting at a specified index position. Computes the Euclidean distance between the two given points.Computes the Euclidean distance between the two given points. Returns the Euclidean distance squared between two specified points.Returns the Euclidean distance squared between two specified points. Divides the specified vector by a specified scalar value.Divides the specified vector by a specified scalar value. Divides the first vector by the second.Divides the first vector by the second. Returns the dot product of two vectors.Returns the dot product of two vectors. Returns a value that indicates whether this instance and a specified object are equal.Returns a value that indicates whether this instance and a specified object are equal. Returns a value that indicates whether this instance and another vector are equal.Returns a value that indicates whether this instance and another vector are equal. Returns the hash code for this instance.Returns the hash code for this instance. Returns the length of the vector.Returns the length of the vector. Returns the length of the vector squared.Returns the length of the vector squared. Performs a linear interpolation between two vectors based on the given weighting.Performs a linear interpolation between two vectors based on the given weighting. Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors.Returns a vector whose elements are the maximum of each of the pairs of elements in two specified vectors. Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors.Returns a vector whose elements are the minimum of each of the pairs of elements in two specified vectors. Multiplies a scalar value by a specified vector.Multiplies a scalar value by a specified vector. Multiplies a vector by a specified scalar.Multiplies a vector by a specified scalar. Returns a new vector whose values are the product of each pair of elements in two specified vectors.Returns a new vector whose values are the product of each pair of elements in two specified vectors. Negates a specified vector.Negates a specified vector. Returns a vector with the same direction as the specified vector, but with a length of one.Returns a vector with the same direction as the specified vector, but with a length of one. Returns the reflection of a vector off a surface that has the specified normal.Returns the reflection of a vector off a surface that has the specified normal. Returns a vector whose elements are the square root of each of a specified vector's elements.Returns a vector whose elements are the square root of each of a specified vector's elements. Subtracts the second vector from the first.Subtracts the second vector from the first. Returns the string representation of the current instance using default formatting.Returns the string representation of the current instance using default formatting. Returns the string representation of the current instance using the specified format string to format individual elements.Returns the string representation of the current instance using the specified format string to format individual elements. Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting.Returns the string representation of the current instance using the specified format string to format individual elements and the specified format provider to define culture-specific formatting. Transforms a vector by a specified 3x2 matrix.Transforms a vector by a specified 3x2 matrix. Transforms a vector by a specified 4x4 matrix.Transforms a vector by a specified 4x4 matrix. Transforms a vector by the specified Quaternion rotation value.Transforms a vector by the specified Quaternion rotation value. Transforms a vector normal by the given 3x2 matrix.Transforms a vector normal by the given 3x2 matrix. Transforms a vector normal by the given 4x4 matrix.Transforms a vector normal by the given 4x4 matrix.

## Операторы

 Adds two vectors together.Adds two vectors together. Divides the specified vector by a specified scalar value.Divides the specified vector by a specified scalar value. Divides the first vector by the second.Divides the first vector by the second. Returns a value that indicates whether each pair of elements in two specified vectors is equal.Returns a value that indicates whether each pair of elements in two specified vectors is equal. Returns a value that indicates whether two specified vectors are not equal.Returns a value that indicates whether two specified vectors are not equal. Multiples the scalar value by the specified vector.Multiples the scalar value by the specified vector. Multiples the specified vector by the specified scalar value.Multiples the specified vector by the specified scalar value. Returns a new vector whose values are the product of each pair of elements in two specified vectors.Returns a new vector whose values are the product of each pair of elements in two specified vectors. Subtracts the second vector from the first.Subtracts the second vector from the first. Negates the specified vector.Negates the specified vector.