<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/UnitCurve",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI9UnitCurveV"
  },
  "title" : "UnitCurve"
}
-->

# UnitCurve

A  function defined by a two-dimensional curve that maps an input
progress in the range [0,1] to an output progress that is also in the
range [0,1]. By changing the shape of the curve, the effective speed
of an animation or other interpolation can be changed.

```
struct UnitCurve
```

## Overview

The horizontal (x) axis defines the input progress: a single input
progress value in the range [0,1] must be provided when evaluating a
curve.

The vertical (y) axis maps to the output progress: when a curve is
evaluated, the y component of the point that intersects the input progress
is returned.

## Topics

### Getting a linear curve

[`linear`](/documentation/SwiftUI/UnitCurve/linear)

A linear curve.

### Getting easing curves

[`easeIn`](/documentation/SwiftUI/UnitCurve/easeIn)

A bezier curve that starts out slowly, then speeds up as it finishes.

[`easeOut`](/documentation/SwiftUI/UnitCurve/easeOut)

A bezier curve that starts out quickly, then slows down as it
approaches the end.

[`easeInOut`](/documentation/SwiftUI/UnitCurve/easeInOut)

A bezier curve that starts out slowly, speeds up over the middle, then
slows down again as it approaches the end.

[`circularEaseIn`](/documentation/SwiftUI/UnitCurve/circularEaseIn)

A curve that starts out slowly, then speeds up as it finishes.

[`circularEaseOut`](/documentation/SwiftUI/UnitCurve/circularEaseOut)

A circular curve that starts out quickly, then slows down as it
approaches the end.

[`circularEaseInOut`](/documentation/SwiftUI/UnitCurve/circularEaseInOut)

A circular curve that starts out slowly, speeds up over the middle,
then slows down again as it approaches the end.

### Creating a general Bezier curve

[`bezier(startControlPoint:endControlPoint:)`](/documentation/SwiftUI/UnitCurve/bezier(startControlPoint:endControlPoint:))

Creates a new curve using bezier control points.

### Inverting a curve

[`inverse`](/documentation/SwiftUI/UnitCurve/inverse)

Returns a copy of the curve with its x and y components swapped.

### Getting curve characteristics

[`value(at:)`](/documentation/SwiftUI/UnitCurve/value(at:))

Returns the output value (y component) of the curve at the given time.

[`velocity(at:)`](/documentation/SwiftUI/UnitCurve/velocity(at:))

Returns the rate of change (first derivative) of the output value of
the curve at the given time.

### Deprecated symbols

[`easeInEaseOut`](/documentation/SwiftUI/UnitCurve/easeInEaseOut)

A bezier curve that starts out slowly, speeds up over the middle,
then slows down again as it approaches the end.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)