| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### sqrt()
Examples |  |
    noStroke();
    float a = sqrt(6561);  // Sets a to 81
    float b = sqrt(625);   // Sets b to 25
    float c = sqrt(1);     // Sets c to 1
    rect(0, 25, a, 10);
    rect(0, 45, b, 10);
    rect(0, 65, c, 10);
Description |  | Calculates the square root of a number. The square root of a number is always positive, even though there may be a valid negative root. The square root s of number a is such that s*s = a. It is the opposite of squaring.
Syntax |  |
    sqrt(value)
Parameters |  |
value |  | int or float: non-negative number
Returns |  | float
Usage |  | Web & Application
Related |  | pow() sq()

| © 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |