Class Oscillogram
Functions
| oscillogram.schema () | |
| oscillogram.from_options (options) |
Tables
| oscillogram.instance |
Metamethods
| oscillogram:__index (index) | ⚠️. |
| oscillogram:__ipairs () | ⚠️. |
| oscillogram:__data () | |
| oscillogram:__tostring () |
Methods
Functions
Methods- oscillogram.schema ()
-
Returns:
-
tab
JSON Schema for this class
(see the luaserialization library)
- oscillogram.from_options (options)
-
Parameters:
- options tab constructor options conforming to the JSON Schema returned by Oscillogram.schema() (see the luaserialization library)
Returns:
Tables
- oscillogram.instance
-
Fields:
- _kind "custom", "linear" or "random"
- _points {number,...}
- _default number
- _range Range
Metamethods
- oscillogram:__index (index)
-
⚠️. It supports direct access to plot points and is used for iterating over them in Lua 5.3+.
Parameters:
- index number [1, ∞)
Returns:
-
Vector2D or nil
- oscillogram:__ipairs ()
-
⚠️. It is used for iterating over plot points in Lua 5.2.
Returns:
- iterators.inext iterator function
- Oscillogram self
- number always zero
- oscillogram:__data ()
-
Returns:
-
tab
table with instance fields
(see the luaserialization library)
- oscillogram:__tostring ()
-
Returns:
-
string
stringified table with instance fields
(see the luaserialization library)
Methods
- oscillogram:new (kind, length[, default=range.min[, range=Range:new(0]])
-
Parameters:
- kind "custom", "linear" or "random"
- length number [0, ∞)
- default number (default range.min)
- range Range (default Range:new(0)
Returns:
- oscillogram:push (point)
-
Parameters:
- point number
- oscillogram:push_with_factor (factor)
-
Parameters:
- factor number
- oscillogram:push_with_random_factor (factor_limit)
-
Parameters:
- factor_limit number
- oscillogram:shift ()
-
Returns:
-
number
- oscillogram:update (value)
-
Parameters:
- value number
Returns:
-
number