1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Better examples for mathematics operators (#3982)

Include = before each number in the Mathematics Operators examples,
so that people get used to seeing that in math examples where dupes
are likely.

Only the Mathematics Operators tiddler really needed to be changed;
the example tiddlers for individual operators were already using =.

Fixes #3979.
This commit is contained in:
Robin Munn 2019-06-17 15:21:23 -05:00 committed by Jeremy Ruston
parent 62829dc9d3
commit 32a2bea7f5

View File

@ -17,15 +17,15 @@ The mathematics operators interpret their arguments as numbers according to the
The mathematics operators take three different forms:
* ''Unary operators'' apply an operation to each number in the input list (e.g. negate, truncate, sign)
** <<.inline-operator-example "1 2 3 4 +[negate[]]">>
** <<.inline-operator-example "1.2 2.4 3.6 4.8 +[trunc[]]">>
** <<.inline-operator-example "1.2 2.4 3.6 4.8 +[round[]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[negate[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[trunc[]]">>
** <<.inline-operator-example "=1.2 =2.4 =3.6 =4.8 +[round[]]">>
* ''Binary operators'' apply an operation and operand to each number in the input list (e.g. add, multiply, remainder)
** <<.inline-operator-example "1 2 3 4 +[add[3]]">>
** <<.inline-operator-example "1 2 3 4 +[multiply[8]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[add[3]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[multiply[8]]">>
* ''Reducing operators'' apply an operation to all of the numbers in the input list, returning a single result (e.g. sum, product)
** <<.inline-operator-example "1 2 3 4 +[sum[]]">>
** <<.inline-operator-example "1 2 3 4 +[product[]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[sum[]]">>
** <<.inline-operator-example "=1 =2 =3 =4 +[product[]]">>
Operators can be combined: