Docs / Shaping functions

Glossary: DoublePolynomialSigmoid

The curve of DoublePolynomialSigmoid, its parameters and its constructor.

Color legend plain property method

Two powers of N that meet at the middle: the in-out of any degree.

A class in the category ShapingFunctionCategory.NOrder. It derives from BaseShapingFunction and has its members too: CalculateOutput gives the curve. The parameters page shows it in context, with what its parameters do.

Names are colored by what they are: a property or a method; values and fields keep the plain color.

The curve

The curve of DoublePolynomialSigmoid for several settings of its parameters
N = 1, 2, 4 and 6: N = 1 is the straight line, and higher N sharpens the S.
Property Value
Id ShapingFunctionId.DoublePolynomialSigmoid, number 40
Category ShapingFunctionCategory.NOrder
Name "Double Polynomial Sigmoid"
Order null
ParameterCount 0
HasVariableOrder true

For an input x from 0 to 1, the output is (2x)N / 2 up to x = 0.5, and 1 − (2 − 2x)N / 2 after it.

N = 1, its default, is Linear, and N = 2 to 5 are QuadraticEaseInOut to QuinticEaseInOut. Higher N sharpens it toward a step at 0.5. It stays within 0 to 1 and never goes back.

Properties

N →

int · From INOrder. The order: the two halves are powers of N. 1 gives Linear, and 2 to 5 the quadratic to quintic in-outs. Clamped to at least 1 when set; 1 by default. Useful from 1 to about 10.

Methods

DoublePolynomialSigmoid() →

DoublePolynomialSigmoid() · Creates the curve, with its parameters at their defaults. ShapingFunctionFactory.Create creates the same from ShapingFunctionId.DoublePolynomialSigmoid.