pow - ryzom/ryzomcore GitHub Wiki


title: Pow description: published: true date: 2023-03-14T03:19:21.050Z tags: editor: markdown dateCreated: 2023-03-14T03:19:21.050Z

pow

The pow native AI script function returns the value of a base raised to the power of an exponent.

Syntax

(ret)pow(pow: f, exponent: f) // pow_ff_f

Arguments

  • pow (float): The base value.
  • exponent (float): The exponent value.

Return value

  • ret (float): Returns the result of raising the base to the exponent.

Examples

(max)pow(2, 8);

This example code calls the pow function with base value 2 and exponent value 8, and returns the result of raising 2 to the power of 8.

Notes

This function is equivalent to the powf function in the C++ standard library.

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