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. @webref math:calculation @webBrief Squares a number (multiplies a number by itself) @param n number to square
(float n)
| 4051 | * @see PApplet#sqrt(float) |
| 4052 | */ |
| 4053 | static public final float sq(float n) { |
| 4054 | return n*n; |
| 4055 | } |
| 4056 | |
| 4057 | /** |
| 4058 | * |
no outgoing calls
no test coverage detected