exp()#

Returns Euler’s number e (2.71828…) raised to the power of the n parameter.

Examples#

1def setup():
2    v1 = py5.exp(1.0)
3    py5.println(v1)  # Prints "2.718281828459045"

Description#

Returns Euler’s number e (2.71828…) raised to the power of the n parameter. This function is the compliment to log().

This function makes a call to the numpy exp() function.

Syntax#

exp(value: Union[float, npt.ArrayLike]) -> Union[float, npt.NDArray]

Parameters#

  • value: Union[float, npt.ArrayLike] - exponent to raise

Updated on February 26, 2022 13:22:44pm UTC