Skip to content
Ryzom Core Wiki edited this page Jul 8, 2024 · 2 revisions

title: Pow description: published: true date: 2023-03-16T23:09:26.900Z tags: editor: markdown dateCreated: 2023-03-16T22:26:41.121Z

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.

Clone this wiki locally