diff --git a/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid b/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid index a0651ea8c..94f89a267 100644 --- a/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid +++ b/editions/tw5.com/tiddlers/filters/Mathematics Operators.tid @@ -1,11 +1,13 @@ created: 20190206140446821 -modified: 20210417090408263 +modified: 20220330133748666 tags: Filters title: Mathematics Operators type: text/vnd.tiddlywiki <<.from-version "5.1.20">>The mathematics filter operators allow numerical calculations to be performed within filters. +! Using mathematics operators + The mathematics operators interpret their arguments as numbers according to the following rules: * Any non-numeric characters after a valid number are ignored (e.g. `28px` is interpreted as the number 28) @@ -28,7 +30,10 @@ The mathematics operators take three different forms: ** <<.inline-operator-example "=1 =2 =3 =4 +[product[]]">> ** <<.inline-operator-example "=1 =2 =3 =4 +[average[]]">> -Operators can be combined: + +! Operations Combination + +Operations can be combined by concatenating them while merging the inner `][` characters. * <<.inline-operator-example "[[355]divide[113]fixed[5]]">> * <<.inline-operator-example "[range[100]sum[]divide[100]]">> @@ -41,4 +46,19 @@ src="""<$set name="number-of-tiddlers" value={{{ [tag[HelloThere]count[]] }}}> Average length of <$text text=<>/> tiddlers tagged <>: <$text text={{{ [tag[HelloThere]get[text]length[]sum[]dividefixed[3]] }}}/> """ /> -<> +! Mathematics Operators list + + + + + + +<$list filter="[tag[Mathematics Operators]sort[caption]]"> + + + + + +
OperatorPurpose
<$link>{{!!caption}}{{!!op-purpose}}
+ +