Class Plot
Functions
| plot.schema () | |
| plot.from_options (options) |
Tables
| plot.instance |
Metamethods
| plot:__index (index) | ⚠️. |
| plot:__ipairs () | ⚠️. |
| plot:__data () | |
| plot:__tostring () |
Methods
| plot:new (length[, default=range.min[, range=Range:new(0]]) | |
| plot:push (point) | |
| plot:push_with_factor (factor) | |
| plot:push_with_random_factor (factor_limit) | |
| plot:shift () |
Functions
Methods- plot.schema ()
-
Returns:
-
tab
JSON Schema for this class
(see the luaserialization library)
- plot.from_options (options)
-
Parameters:
- options tab constructor options conforming to the JSON Schema returned by Plot.schema() (see the luaserialization library)
Returns:
Tables
Metamethods
- plot:__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
- plot:__ipairs ()
-
⚠️. It is used for iterating over plot points in Lua 5.2.
Returns:
- iterators.inext iterator function
- Plot self
- number always zero
- plot:__data ()
-
Returns:
-
tab
table with instance fields
(see the luaserialization library)
- plot:__tostring ()
-
Returns:
-
string
stringified table with instance fields
(see the luaserialization library)
Methods
- plot:new (length[, default=range.min[, range=Range:new(0]])
-
Parameters:
- length number [0, ∞)
- default number (default range.min)
- range Range (default Range:new(0)
Returns:
- plot:push (point)
-
Parameters:
- point number
- plot:push_with_factor (factor)
-
Parameters:
- factor number
- plot:push_with_random_factor (factor_limit)
-
Parameters:
- factor_limit number
- plot:shift ()
-
Returns:
-
number