docs/log: math timestamp
This commit is contained in:
parent
1a1920e251
commit
21c59ff446
2 changed files with 6 additions and 2 deletions
|
|
@ -9,8 +9,9 @@
|
|||
- **new** `gyroscope` widget
|
||||
- **new** `frame` widget
|
||||
- **breaking change** in `panel`: dropped Visual Format Language support (`layout` and `spacing` properties)
|
||||
- maths: added `timestamp()` function
|
||||
- editor
|
||||
- widget property names can be clicked to show documentation
|
||||
- widget property names can be clicked to show documentation
|
||||
- misc
|
||||
- the client app can be translated (https://github.com/jean-emmanuel/open-stage-control/issues/302)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Where FORMULA is a valid [MathJS](http://mathjs.org/docs/expressions/syntax.html
|
|||
- formulas can be [multiline](http://mathjs.org/docs/expressions/syntax.html#multiline-expressions)
|
||||
- property inheritance calls (`@{...}`) are always resolved before formulas
|
||||
- arrays / matrices indexes are **zero-based** (ie `["a","b"][0]` returns `"a"`)
|
||||
- strings can be multiline when enclosed in backticks instead of double quotes (``` ` ` ```)
|
||||
- strings can be multiline when enclosed in backticks (``` ` ` ```)
|
||||
- inner closing brackets (`}`) must be escaped with a backslash (`\}`)
|
||||
|
||||
Additionnal functions:
|
||||
|
|
@ -22,6 +22,9 @@ Additionnal functions:
|
|||
- `unpack(x)`: remove an array's brackets (`unpack([1,2])` returns `"1, 2"`)
|
||||
- `pad(x, padding)`: add leading zeros if the length the integer part of `x` is smaller than `padding` (`pad(1,2)` returns `"01"`)
|
||||
- `length(x)`: returns the length of an array or string
|
||||
- `values(x)`: returns an array of a given object's own property values
|
||||
- `keys(x)`: returns an array of a given object's own property names
|
||||
- `timestamp()`: returns the number of milliseconds elapsed since January 1, 1970
|
||||
|
||||
!!! tip ""
|
||||
A single widget property can contain multiple formulas. Variables and functions declared in a formula are available to subsequent formulas in the same property definition.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue