Vector2F Structure |
Namespace: Slash.Math.Algebra.Vectors
The Vector2F type exposes the following members.
Name | Description | |
---|---|---|
Vector2F(Single) |
Constructor.
| |
Vector2F(Vector2F) |
Constructor.
| |
Vector2F(Single, Single) |
Constructor.
|
Name | Description | |
---|---|---|
IsNonZero |
Indicates if at least one vector component is not zero.
| |
IsZero |
Indicates if all vector components are zero.
| |
Magnitude |
Magnitude of the vector.
| |
SquareMagnitude |
Square magnitude of the vector.
|
Name | Description | |
---|---|---|
Abs |
Returns a vector whose components represent the absolute values of
the components of the specified vector.
| |
Add |
Adds the passed values to the x and y value.
| |
Area |
Returns a positive number if c is to the left of the line going from a to b.
| |
CalculateAngle |
Calculates the angle between two vectors on a plane.
| |
CalculateDotProduct |
Calculates the dot product of this and the passed vector. See http://en.wikipedia.org/wiki/Dot_product for more
details.
| |
Collinear(Vector2F, Vector2F, Vector2F) |
Determines if three vectors are collinear (ie. on a straight line).
| |
Collinear(Vector2F, Vector2F, Vector2F, Single) |
Determines if three vectors are collinear (ie. on a straight line).
| |
Cross |
Calculates the cross product of the two passed vectors. See http://en.wikipedia.org/wiki/Cross_product for more
details.
| |
Distance |
Returns the distance between the two passed vectors.
| |
Dot |
Calculates the dot product of the two passed vectors. See http://en.wikipedia.org/wiki/Dot_product for more details.
| |
Equals(Object) | (Overrides ValueTypeEquals(Object).) | |
Equals(Vector2F) |
Determines whether the specified Vector2F is equal to the current Vector2F.
| |
GetDistance |
Calculates the distance between this and the passed vector.
| |
GetHashCode |
Serves as a hash function for a particular type.
(Overrides ValueTypeGetHashCode.) | |
GetNormalized |
Returns the normalized vector.
| |
GetPerpendicularVector |
Returns a vector which is perpendicular to this vector.
| |
GetReflected |
Creates a new vector which is reflected by the specified vector.
| |
GetSquareDistance |
Calculates the square distance between this and the passed vector.
| |
IsParallel |
Checks if this vector is parallel or anti-parallel to the passed one.
| |
Limit |
Creates a new vector which is limited to the specified length.
If the vector is longer it is truncated, otherwise it stays the same.
| |
Max |
Creates a new vector out of the two passed vectors and takes the maximum values from these for each component.
| |
Min |
Creates a new vector out of the two passed vectors and takes the minimum values from these for each component.
| |
Normalize |
Normalizes this vector.
| |
Rotate |
Rotates the vector counter-clockwise.
| |
Slerp |
Spherically interpolates between the two passed vectors.
| |
ToString |
Returns a string that represents the current object.
(Overrides ValueTypeToString.) | |
Truncate |
Changes the magnitude of this vector to the passed value.
|
Name | Description | |
---|---|---|
Addition(Vector2F, Vector2F) |
Sums the components of the passed vectors and returns the resulting vector.
| |
Addition(Vector2F, Single) |
Adds the passed float value to each component of the passed vector.
| |
Division |
Divides each component of the passed vector by the passed value.
| |
Equality |
Indicates if the two passed vectors are equal.
| |
Inequality |
Indicates if the two passed vectors are not equal.
| |
Multiply(Single, Vector2F) |
Multiplies each vector component with the passed float value.
| |
Multiply(Vector2F, Vector2F) |
Multiplies each vector component of the two passed vectors.
| |
Multiply(Vector2F, Single) |
Multiplies each vector component with the passed float value.
| |
Subtraction(Vector2F, Vector2F) |
Subtracts the components of the second passed vector from the first passed.
| |
Subtraction(Vector2F, Single) |
Subtracts the passed float value from each component of the passed vector.
| |
UnaryNegation |
Negates each component of the passed vector.
|
Name | Description | |
---|---|---|
Forward |
Unrotated forward vector.
| |
MinusOne |
Both vector components are -1.
| |
One |
Both vector components are 1.
| |
Side |
Unrotated side vector.
| |
SideAngle |
Angle to transform forward to side vector.
| |
UnitX |
X component is 1, Y component is 0.
| |
UnitY |
X component is 0, Y component is 1.
| |
X |
X component.
| |
Y |
Y component.
| |
Zero |
Both vector components are 0.
|
Name | Description | |
---|---|---|
ToVector2 |
Converts the specified framework vector to an Unity vector.
(Defined by MathConversionExtensions.) | |
ToVector3 |
Converts the specified framework vector to an Unity vector.
(Defined by MathConversionExtensions.) | |
ToVector3F |
Returns the 3D representation of this 2D vector and z coordinate.
(Defined by VectorExtensions.) | |
ToVector3XY |
Converts the specified framework vector to an Unity vector.
(Defined by MathConversionExtensions.) | |
ToVector3XZ |
Converts the specified framework vector to an Unity vector.
(Defined by MathConversionExtensions.) |