exp - ryzom/ryzomcore GitHub Wiki


title: Exp description: published: true date: 2023-03-14T02:46:24.217Z tags: editor: markdown dateCreated: 2023-03-14T02:46:24.217Z

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.

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