# SpringDamper(float, float, float, float, float)

> Calculate a one-dimensional mass-spring-damper simulation which drives towards a zero translation. You can then compute the new position using: "translation += newSpeed * deltaTime;"

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public static float SpringDamper(float frequency, float damping, float translation, float speed, float deltaTime)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The frequency of the spring, in cycles per second.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The damping of the spring. Must be >= zero.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The current translation of the spring.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The current speed of the spring.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The time over which to simulate the spring.

### Returns

| Type                                                          | Description                      |
| ------------------------------------------------------------- | -------------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The new calculated spring speed. |
