Reference+
Name
square()
Description
Draws a square to the screen. A square is a four-sided shape with every angle at ninety degrees and each side is the same length. By default, the first two parameters set the location of the upper-left corner, the third sets the width and height. The way these parameters are interpreted, however, may be changed with the rectMode() function.
Examples
square(120, 100, 220);
Syntax
square(x, y, extent)
Parameters
x
(float)
x-coordinate of the rectangle by defaulty
(float)
y-coordinate of the rectangle by defaultextent
(float)
width and height of the rectangle by default
Return
void
Related

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.