Class Plot

Tables

plot.instance

Metamethods

plot:__index (index) It is used for iterating over plot points in Lua 5.3+.
plot:__ipairs () It is used for iterating over plot points in Lua 5.2.

Methods

plot:new (length[, default=minimum[, minimum=0[, maximum=1]]])
plot:push (point)
plot:push_with_factor (factor)
plot:push_with_random_factor (factor_limit)
plot:shift ()


Tables

plot.instance

Fields:

  • _points {number,...}
  • _default number
  • _minimum number
  • _maximum number

Metamethods

plot:__index (index)
It is used for iterating over plot points in Lua 5.3+.

Parameters:

  • index number [1, ∞)

Returns:

    number
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

Methods

plot:new (length[, default=minimum[, minimum=0[, maximum=1]]])

Parameters:

  • length number [0, ∞)
  • default number (default minimum)
  • minimum number (default 0)
  • maximum number [minimum, ∞) (default 1)

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 2025-01-10 15:12:53