Class Polygon

A polygon class

Usage:

    b = Polygon!
    

Methods

polygon\new (x, y, n, radius, angle) constructor
polygon\contains (x, y) tests if a given point is inside the poly.
polygon\getVertices () getter for vertices.
polygon\getRadius () getter for radius.
polygon\setPosition (x, y) setter for position.
polygon\getX () getter for the circle x position.
polygon\getY () getter for the circle y position.
polygon\getPosition () getter for position.
polygon\setSides (sides) setter for sides.
polygon\getSides () getter for sides.
polygon\setAngle (angle) setter for angle.
polygon\getAngle () getter for angle.


Methods

polygon\new (x, y, n, radius, angle)
constructor

Parameters:

  • x number
  • y number
  • n number
  • radius number
  • angle number
polygon\contains (x, y)
tests if a given point is inside the poly.

Parameters:

  • x number
  • y number

Returns:

    boolean
polygon\getVertices ()
getter for vertices.

Returns:

    table
polygon\getRadius ()
getter for radius.

Returns:

    number
polygon\setPosition (x, y)
setter for position.

Parameters:

  • x number
  • y number
polygon\getX ()
getter for the circle x position.

Returns:

    number
polygon\getY ()
getter for the circle y position.

Returns:

    number
polygon\getPosition ()
getter for position.

Returns:

    number
polygon\setSides (sides)
setter for sides.

Parameters:

  • sides number
polygon\getSides ()
getter for sides.

Returns:

    number
polygon\setAngle (angle)
setter for angle.

Parameters:

  • angle number
polygon\getAngle ()
getter for angle.

Returns:

    number
generated by LDoc 1.5.0 Last updated 2024-01-14 01:18:20