Vector2 Structure |
Namespace: SampSharp.Entities.SAMP
public struct Vector2 : IEquatable<Vector2>
The Vector2 type exposes the following members.
Name | Description | |
---|---|---|
Vector2(Double) |
Initializes a new instance of the Vector2 struct with same values for x and y components.
| |
Vector2(Single) |
Initializes a new instance of the Vector2 struct with same values for x and y components.
| |
Vector2(Double, Double) |
Initializes a new instance of the Vector2 struct.
| |
Vector2(Single, Single) |
Initializes a new instance of the Vector2 struct.
|
Name | Description | |
---|---|---|
IsEmpty |
Gets whether this Vector2 is empty.
| |
Length |
Gets the length of this Vector2.
| |
One |
Returns a Vector2 with each component set to 1.
| |
SquaredLength |
Gets the squared length of this Vector2.
| |
UnitX |
Returns a Vector2 with components 1, 0.
| |
UnitY |
Returns a Vector2 with components 0, 1.
| |
X |
Gets the X component of this Vector2.
| |
Y |
Gets the Y component of this Vector2.
| |
Zero |
Returns an empty Vector2.
|
Name | Description | |
---|---|---|
Barycentric |
Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric
coordinates and relative to 2d-triangle.
| |
CatmullRom |
Creates a new Vector2 that contains CatmullRom interpolation of the specified vectors.
| |
Clamp |
Clamps the specified value within a range.
| |
Distance |
Returns the distance between two vectors.
| |
DistanceSquared |
Returns the squared distance between two vectors.
| |
DistanceTo |
Gets the distance to another Vector2.
| |
Dot |
Returns a dot product of two vectors.
| |
Equals(Object) |
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).) | |
Equals(Vector2) |
Indicates whether this instance and a specified object are equal.
| |
GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Hermite |
Creates a new Vector2 that contains hermite spline interpolation.
| |
Lerp |
Creates a new Vector2 that contains linear interpolation of the specified vectors.
| |
Max |
Creates a new Vector2 that contains a maximal values from the two vectors.
| |
Min |
Creates a new Vector2 that contains a minimal values from the two vectors.
| |
Normalize |
Creates a new Vector2 that contains a normalized values from another vector.
| |
Normalized |
Creates a new Vector2 instance with the components normalized to a single unit.
| |
Reflect |
Creates a new Vector2 that contains reflect vector of the given vector and normal.
| |
SmoothStep |
Creates a new Vector2 that contains cubic interpolation of the specified vectors.
| |
ToString |
Returns the fully qualified type name of this instance.
(Overrides ValueTypeToString.) | |
Transform(Vector2, Matrix) |
Creates a new Vector2 that contains a transformation of 2d-vector by the specified
Matrix.
| |
Transform(Vector2, Quaternion) |
Creates a new Vector2 that contains a transformation of 2d-vector by the specified
Quaternion, representing the rotation.
| |
TransformNormal |
Creates a new Vector2 that contains a transformation of the specified normal by the specified
Matrix.
|
Name | Description | |
---|---|---|
Addition |
Adds the left Vector2's components to the right Vector2's components and stores it in
a
new Vector2.
| |
Division(Vector2, Vector2) |
Divides the components Vector2 by the components of the right Vector2 and stores them
in a new Vector2.
| |
Division(Vector2, Single) |
Divides the components Vector2 by the given scalar and stores them in a new Vector2.
| |
Equality |
Tests whether all components of both Vector2 are equivalent.
| |
Inequality |
Tests whether any component of both Vector2 are not equivalent.
| |
Multiply(Single, Vector2) |
Multiplies the components Vector2 by the given scalar and stores them in a new
Vector2.
| |
Multiply(Vector2, Vector2) |
Multiplies the components Vector2 by the components of the right Vector2 and stores
them in a new Vector2.
| |
Multiply(Vector2, Single) |
Multiplies the components Vector2 by the given scalar and stores them in a new
Vector2.
| |
Subtraction |
Subtracts the right Vector2's components from the left Vector2's components and
stores
it in a new Vector2.
| |
UnaryNegation |
Creates a Vector2 with the components set to the negative values of the given
vector's components.
|