Home / Function/ elasticInOut() — svelte Function Reference

elasticInOut() — svelte Function Reference

Architecture documentation for the elasticInOut() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  9a5afac2_057c_51c8_ea0f_26624aeceee9["elasticInOut()"]
  8d8f0ca3_5d92_5886_ea4e_cf91e157cffe["index.js"]
  9a5afac2_057c_51c8_ea0f_26624aeceee9 -->|defined in| 8d8f0ca3_5d92_5886_ea4e_cf91e157cffe
  style 9a5afac2_057c_51c8_ea0f_26624aeceee9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/easing/index.js lines 133–140

export function elasticInOut(t) {
	return t < 0.5
		? 0.5 * Math.sin(((+13.0 * Math.PI) / 2) * 2.0 * t) * Math.pow(2.0, 10.0 * (2.0 * t - 1.0))
		: 0.5 *
				Math.sin(((-13.0 * Math.PI) / 2) * (2.0 * t - 1.0 + 1.0)) *
				Math.pow(2.0, -10.0 * (2.0 * t - 1.0)) +
				1.0;
}

Subdomains

Frequently Asked Questions

What does elasticInOut() do?
elasticInOut() is a function in the svelte codebase, defined in packages/svelte/src/easing/index.js.
Where is elasticInOut() defined?
elasticInOut() is defined in packages/svelte/src/easing/index.js at line 133.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free