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

title: Exp description: published: true date: 2023-03-16T23:06:38.058Z tags: editor: markdown dateCreated: 2023-03-16T22:23:04.337Z

exp

The exp native AI script function returns the exponent of the input value, which is equal to e^x.

Syntax

(y)exp(x); // exp_f_f

Arguments

  • x (float): The input value to compute the exponent for.

Return value

  • y (float): The exponent of the input value.

Examples

distance = 2.0f;
(exp_distance)exp(distance);

This example code calculates the exponent of the distance variable and stores the result in exp_distance.

Notes

This function can be used to compute the exponential value of a given input, where e is the mathematical constant approximately equal to 2.718.

Clone this wiki locally