# eaz

## Use Predefined Easing Functions

Using predefined easing functions is as simple as referencing a static property of the **`Easing`** class.

```javascript
import { Easing } from 'eaz';

Easing.cubic.in(0.3); // Output: 0.0269
```

{% hint style="info" %}
Every **`Easing`** object contains an in, out, and inOut method, and more options. Refer to the documentation for th&#x65;**`Easing`** class for more information.
{% endhint %}

## Create Custom Easing Functions

Use eaz's generational methods to create custom easing functions quickly

```javascript
import { Easing } from 'eaz';

Easing.polynomial(2.5).in(0.3); // Output: 0.0493
```

Or create entirely custom easing methods from scratch

```javascript
import { Easing } from 'eaz';

const myEasing = new Easing(t => t ** 2.5);
myEasing.in(0.3); // Output: 0.0493
```

## Easily Generate Demo Images

Generate images to test your easing functions

{% tabs %}
{% tab title="JavaScript" %}

```javascript
import { Easing, DemoImage } from '../index';

DemoImage.inOut(Easing.cubic, 'images/cubicInOut.png');
```

{% endtab %}

{% tab title="Output" %}

#### images/cubicInOut.png

![](/files/-MFKsVAg6w3Hdkt5ndgo)

###

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://robertmay2003.gitbook.io/eaz/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
