mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
13 lines
192 B
V
13 lines
192 B
V
|
module math
|
||
|
|
||
|
fn JS.Math.exp(x f64) f64
|
||
|
|
||
|
// exp calculates exponent of the number (math.pow(math.E, x)).
|
||
|
[inline]
|
||
|
pub fn exp(x f64) f64 {
|
||
|
mut res := 0.0
|
||
|
#res.val = Math.exp(x)
|
||
|
|
||
|
return res
|
||
|
}
|