sqrt

Summary

Returns the square root of a number.

Usage

public static double sqrt(double x)

Returns

The square root of the specified value.

Parameters

x

The value to calculate the square root of.

Description

Returns the square root of a number.

Examples

Basic Usage
1
2
3
4
5
import Sytem;
 
Console.log(Math.sqrt(4)); // 2
Console.log(Math.sqrt(9)); // 3
Console.log(Math.sqrt(2)); // 1.4142135623730951

Share

HTML | BBCode | Direct Link