Vector2.Transform Method (Vector2, Quaternion)
Transforms a single Vector2, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.
Syntax
'Declaration
Public Shared Function Transform ( _
value As Vector2, _
rotation As Quaternion _
) As Vector2
public static Vector2 Transform (
Vector2 value,
Quaternion rotation
)
public:
static Vector2 Transform(
Vector2 value,
Quaternion rotation
)
Parameters
- value
Type: Vector2
The vector to rotate. - rotation
Type: Quaternion
The Quaternion rotation to apply.
Return Value
Type: Vector2
Returns a new Vector2 containing the result of the rotation.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | destinationArray is too small to contain the result. |
Requirements
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
See Also
Reference
Vector2 Structure
Vector2 Members
Microsoft.Xna.Framework Namespace
Platforms
Windows Phone