Class Circle

A circle class

Usage:

    c = Circle!
    

Methods

circle\new (x, y, radius) constructor passed a pos (x, y) and radius which must be numbers.
circle\contains (x, y) tests if a given point is inside the circle.
circle\getPosition () getter for the circle position.
circle\getX () getter for the circle x position.
circle\getY () getter for the circle y position.
circle\getRadius () getter for the circle radius.
circle\getSize () getter for the circle radius.
circle\getWidth () getter for the circle width.
circle\getHeight () getter for the circle's height.
circle\setPosition (x, y) setter for the circle position.
circle\setRadius (radius) setter for the circle radius.


Methods

circle\new (x, y, radius)
constructor passed a pos (x, y) and radius which must be numbers.

Parameters:

  • x number
  • y number
  • radius number
circle\contains (x, y)
tests if a given point is inside the circle.

Parameters:

  • x number
  • y number

Returns:

    boolean
circle\getPosition ()
getter for the circle position.

Returns:

    table
circle\getX ()
getter for the circle x position.

Returns:

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

Returns:

    number
circle\getRadius ()
getter for the circle radius.

Returns:

    number
circle\getSize ()
getter for the circle radius.

Returns:

    number
circle\getWidth ()
getter for the circle width.

Returns:

    number
circle\getHeight ()
getter for the circle's height.

Returns:

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

Parameters:

  • x number
  • y number
circle\setRadius (radius)
setter for the circle radius.

Parameters:

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