Skip to main content

Sqrt

Returns the square root of the input.

Square Root block

Description​

The Square Root block returns the square root of the input. This is a code block part of the Math drawer.

Usage​

Returns the square root of the input.

Syntax​

Inputs in this block:

  • A number

Example​

The procedure shown above calculates the distance that the 'Hypotenuse tracer' agent must travel using the pythagorean theorem in order to draw the full hypotenuse of the right triangle.

Square Root example code

Notes​

The Square Root block is commonly used in distance calculations and when implementing mathematical formulas like the Pythagorean theorem.

  • Power - Raise a number to a power