v / vlib / math / pow.c.v
17 lines · 13 sloc · 338 bytes · 757929392e0e7a75fc1272116460981e589737d5
Raw
1module math
2
3fn C.pow(x f64, y f64) f64
4
5fn C.powf(x f32, y f32) f32
6
7// pow returns the base x, raised to the provided power y. (float64)
8@[inline]
9pub fn pow(x f64, y f64) f64 {
10 return C.pow(x, y)
11}
12
13// powf returns the base a, raised to the provided power b. (float32)
14@[inline]
15pub fn powf(a f32, b f32) f32 {
16 return C.powf(a, b)
17}
18