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:

Returns:

    Plot

Tables

plot.instance

Fields:

  • _points {number,...}
  • _default number
  • _range Range

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:

  1. iterators.inext iterator function
  2. Plot self
  3. 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
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
generated by LDoc 1.5.0 Last updated 2026-09-20 07:37:32