sqrt - ryzom/ryzomcore GitHub Wiki


title: Sqrt description: published: true date: 2023-03-13T16:57:33.221Z tags: editor: markdown dateCreated: 2023-03-13T16:57:33.221Z

sqrt

The sqrt native AI script function returns the square root of the input value.

Syntax

(y: f)sqrt(x: f) // sqrt_f_f

Arguments

  • x (float): A real value.

Return value

  • y (float): The square root of x.

Examples

(y)sqrt(25);

This example code calculates the square root of 25 and stores the result in the variable y.

Notes

The square root is defined as the number that, when multiplied by itself, gives the original number. The sqrt function is a mathematical function that is commonly used in many fields, including physics, engineering, and statistics.

This function can be used in combination with other native AI script functions to perform complex mathematical calculations.

⚠️ **GitHub.com Fallback** ⚠️