# C#: Functions

Source: https://tweens.gd/csharp/functions/

Supply your own easing as a function when a built-in family does not fit. It maps normalized progress to an interpolation weight.

Examples use `using Godot;` and `using tweens.gd;` in a Node method, with targets inside the scene tree.

## Use a function

```csharp
var move = new Tweens.Position2DX(300, 0.6)
{
    EaseFunction = t => t * t,
};

sprite.Tween(move);
```

This starts slowly and accelerates. At halfway through the time, the weight is 0.25, so the sprite has travelled a quarter of the distance.

Time in, weight out

Progress runs from 0 to 1. Return 0 at the start and 1 at the end for an ordinary arrival. Weights outside that range create overshoot; a function ending at 0 returns to its starting value.

Choose one custom source

Set `EaseFunction` or a [`Curve`](https://tweens.gd/csharp/curves/), not both. Either overrides the built-in ease. Custom profiles keep their own pacing instead of using the In/Out split controls.

To keep the exact curve of a Godot transition, [sample it with `Tween.InterpolateValue`](https://tweens.gd/porting/#spring-and-out-in).

[Curves](https://tweens.gd/csharp/curves/)Draw an ease in the Inspector instead.

[Effects](https://tweens.gd/csharp/effects/)Ready-made functions for punch, shake, and breathing.

The [easing reference](https://tweens.gd/csharp/api/easing/#custom-functions-and-curves) covers validation and failures.
