sq()

Math / Calculation

Description

Squares a number (multiplies a number by itself). Same as x*x.

Syntax

float sq(float x)

Parameters

NameTypeDescription
xfloatnumber to square

Returns

float

Related

Under the Hood

From Processing.h:

static float sq(float x) { return x*x; }