# PhysicsRotate

> Represents a 2D rotation.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule
* **Implements:** [ISerializationCallbackReceiver](/engine/6000.3/script-reference/unityengine/iserializationcallbackreceiver.md)

```csharp
public struct PhysicsRotate : ISerializationCallbackReceiver
```

## Fields

| Value                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [direction](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/direction.md) | The rotation direction where X = cos(angle) and Y = sin(angle). This should always be normalized otherwise warnings will be produced when used, however this is not enforced. See [PhysicsRotate.isNormalized](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/isnormalized.md) and [PhysicsRotate.Normalized](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/normalized.md). |

## Constructors

| Constructor                                                                                                                                                                                                                       | Description                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| [PhysicsRotate()](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/ctor.md#physicsrotate\(\))                                                                                                          | Create an identity rotation.                                                                                  |
| [PhysicsRotate(System.Single)](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/ctor.md#physicsrotate\(float\))                                                                                        | Create a rotation with the specified angle.                                                                   |
| [PhysicsRotate(UnityEngine.Quaternion,UnityEngine.LowLevelPhysics2D.PhysicsWorld.TransformPlane)](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/ctor.md#physicsrotate\(quaternion-transformplane\)) | Create a rotation with the specified [Quaternion](/engine/6000.3/script-reference/unityengine/quaternion.md). |
| [PhysicsRotate(UnityEngine.Vector2)](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/ctor.md#physicsrotate\(vector2\))                                                                                | Create a rotation with the specified direction.                                                               |

## Properties

| Property                                                                                                    | Description                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [angle](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/angle.md)               | Get the angle which this rotation represents, in radians.                                                                                                                                |
| [cos](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/cos.md)                   | The cosine of the rotation angle.                                                                                                                                                        |
| [isNormalized](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/isnormalized.md) | Is the rotation normalized? If not, it should be normalized using [PhysicsRotate.Normalized](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/normalized.md). |
| [isValid](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/isvalid.md)           | Check if the rotation is valid (not NaN and Normalized).                                                                                                                                 |
| [sin](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/sin.md)                   | The sine of the rotation angle.                                                                                                                                                          |

## Static Properties

| Property                                                                                            | Description                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [down](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/down.md)         | A rotation of -PI/2 Radians (-90 Degrees or +270 Degrees).                                                                                                                       |
| [identity](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/identity.md) | The identity rotation i.e. no rotation.                                                                                                                                          |
| [left](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/left.md)         | A rotation of +PI Radians (+/- 180 Degrees).                                                                                                                                     |
| [right](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/right.md)       | A rotation of zero Radians. This is the same as identity. See [PhysicsRotate.identity](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/identity.md). |
| [up](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/up.md)             | A rotation of +PI/2 Radians (+90 Degrees).                                                                                                                                       |

## Methods

| Method                                                                                                                            | Description                                                                                                                                                                                            |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [AngularVelocity](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/angularvelocity.md)                 | Calculate the angular velocity necessary to rotate the current rotation and the specified rotation over a give time.                                                                                   |
| [GetMatrix](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/getmatrix.md)                             | Calculate a rotation [Matrix4x4](/engine/6000.3/script-reference/unityengine/matrix4x4.md) using the specified transform plane.                                                                        |
| [GetRelativeAngle](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/getrelativeangle.md)               | Get the relative angle between this rotation and the specified rotation. The limits of this are +/- [PhysicsMath.PI](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsmath/pi.md). |
| [IntegrateRotation](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/integraterotation.md)             | Integrate the rotation using the specified angle change.                                                                                                                                               |
| [InverseMultiplyRotation](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/inversemultiplyrotation.md) | Inverse Multiply a rotation with this rotation.                                                                                                                                                        |
| [InverseRotateVector](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/inverserotatevector.md)         | Inverse Rotate a vector.                                                                                                                                                                               |
| [LerpRotation](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/lerprotation.md)                       | Calculate the normalized linear interpolation of this rotation and the specified rotation using the specified interval.                                                                                |
| [MultiplyRotation](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/multiplyrotation.md)               | Multiply a rotation with this rotation.                                                                                                                                                                |
| [Normalized](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/normalized.md)                           | Create a normalized rotation.                                                                                                                                                                          |
| [Rotate](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/rotate.md)                                   | Rotate the rotation by the specified angle.                                                                                                                                                            |
| [RotateVector](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/rotatevector.md)                       | Rotate a vector.                                                                                                                                                                                       |

## Static Methods

| Method                                                                                                            | Description                                                                                       |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [AngularVelocity](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/angularvelocity.md) | Calculate the angular velocity necessary to rotate between two rotations over a give time.        |
| [LerpRotation](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/lerprotation.md)       | Calculate the normalized linear interpolation between two rotations using the specified fraction. |
| [UnwindAngle](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsrotate/unwindangle.md)         | Convert any angle into the range \[-pi, pi].                                                      |
