Skip to content

Commit 742a7be

Browse files
committed
[css-easing-2] Make linear() accept the before flag, like stepped functions, with the same behavior for discontinuities.
1 parent 4c55ed2 commit 742a7be

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

css-easing-2/Overview.bs

+8-3
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ Output</h4>
294294

295295
To <dfn export>calculate linear easing output progress</dfn>
296296
for a given [=linear easing function=] |func|,
297-
and an [=input progress value=] |inputProgress|,
297+
an [=input progress value=] |inputProgress|,
298+
and an optional [=before flag=] (defaulting to false),
298299
perform the following.
299300
It returns an [=output progress value=].
300301

@@ -305,8 +306,12 @@ Output</h4>
305306
of that item.
306307

307308
3. If at least one of |points| has an [=input progress value=]
308-
matching |inputProgress|,
309-
return the [=output progress value=] of the last such point.
309+
matching |inputProgress|:
310+
311+
* If the [=before flag=] is true,
312+
return the [=output progress value=] of the first such point.
313+
* Otherwise,
314+
return the [=output progress value=] of the last such point.
310315

311316
4. Otherwise, find two [=linear()/control points=],
312317
|A| and |B|,

0 commit comments

Comments
 (0)