Name

sq()

Examples
noStroke()
a = sq(1)  # Sets 'a' to 1
b = sq(-5)  # Sets 'b' to 25
c = sq(9)  # Sets 'c' to 81
rect(0, 25, a, 10)
rect(0, 45, b, 10)
rect(0, 65, c, 10)
Description Squares a number (multiplies a number by itself). The result is always a positive number, as multiplying two negative numbers always yields a positive result. For example, -1 * -1 = 1.
Syntax
	sq(n)
Parameters
nvalue to be squared (mutliplied by itself)
Related sqrt()

Updated on Mon Sep 21 15:53:25 2020.

If you see any errors or have comments, please let us know.