Description
Map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.
Easing maps normalized progress to a dimensionless curve value. A slope differentiates that curve with respect to progress, while delay remapping and ping-pong phases change the input coordinate. To turn progress into position or time-dependent velocity, supply the application’s distance scale and duration separately.
Map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.
When to use this tool
Use this tool to map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.
How to use the tool and how it works
- Enter progress using the input definitions below.
- Run the operation. Resolve malformed-input errors before interpreting the result.
- Read result.phase, result.direction. Interpret signs, units, ordering and null values using the rules below.
Normalize signed progress modulo two to p in [0,2). Return phase = p for p≤1 and 2−p otherwise; direction is +1 for p<1 and −1 otherwise.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| progress | Signed continuous progress coordinate; every two units form a ping-pong period. | Finite number satisfying the stated comparisons. |
| Output field | Interpretation |
|---|---|
| result | Object containing the fields below. |
| result.phase | Triangular normalized phase from 0 through 1. |
| result.direction | Outgoing branch sign: +1 ascending or −1 descending. |
{
"input": {
"progress": 1.25
},
"output": {
"result": {
"phase": 0.75,
"direction": -1
}
}
} Limitations and assumptions
- At phase zero use the outgoing +1 branch; at phase one use the outgoing −1 branch. This samples a triangular phase, not a motion history.
- Curves ordinarily require normalized input t from 0 through 1; ping-pong and delay-remapping operations instead accept their explicitly stated progress coordinates. Floating-point roundoff remains possible.
- Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.
Alternative or Complementary methods
Choose the curve and parameter convention before combining operations. Use a scheduler or animation engine for playback, and apply the appropriate duration/distance factors when interpreting slopes physically.
References
Similar or alternative tools
- Unit Progress Delay Remap
Remap an explicit progress interval into a clamped unit interval; delay/end are finite ordered coordinates, not a scheduler.
- Unit Cubic In Out Easing Value
Evaluate Unit Cubic In Out Easing Value on the closed unit domain; deterministic numerical curve arithmetic without animation scheduling.