Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hist/hist/src/TFormula.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,25 @@ std::string doubleToString(double val)
above also applies to the predefined parametrized functions like `gaus` and
`expo`.

Comparisons operators are also supported `(&&, ||, ==, <=, >=, !)`
Comparisons operators are also supported `(&&, ||, ==, <=, >=, !)`

Examples:

`sin(x*(x&lt;0.5 || x&gt;1))`
`sin(x*(x<0.5 || x>1))`

If the result of a comparison is TRUE, the result is 1, otherwise 0.

Already predefined names can be given. For example, if the formula

`TFormula old("old",sin(x*(x&lt;0.5 || x&gt;1)))`
`TFormula old("old",sin(x*(x<0.5 || x>1)))`

one can assign a name to the formula. By default the name of the object = title = formula itself.

`TFormula new("new","x*old")`

is equivalent to:

`TFormula new("new","x*sin(x*(x&lt;0.5 || x&gt;1))")`
`TFormula new("new","x*sin(x*(x<0.5 || x>1))")`

The class supports unlimited number of variables and parameters.
By default the names which can be used for the variables are `x,y,z,t` or
Expand Down