Sqrt

From Eternity Wiki
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Returns the square root of a number.

Usage[edit]

int Sqrt(int number)

fixed FixedSqrt(fixed number)

Parameters[edit]

  • number: operand, which can be integer or fixed point, depending on function.

Return value[edit]

The square root.

Examples[edit]

No examples given.

Notes[edit]

Be careful that Sqrt only operates and returns integers, and the result is rounded down. For a negative operand, it will return 0 and beep an error. If you need decimal precision, use FixedSqrt.

This function's identification in zspecial.acs is: -48 for Sqrt, -49 for FixedSqrt.

See also[edit]