mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib/math: Add a pure V backend for vlib/math (#11267)
This commit is contained in:
committed by
GitHub
parent
dd486bb0fb
commit
1cfc4198f5
17
vlib/math/pow.c.v
Normal file
17
vlib/math/pow.c.v
Normal file
@@ -0,0 +1,17 @@
|
||||
module math
|
||||
|
||||
fn C.pow(x f64, y f64) f64
|
||||
|
||||
fn C.powf(x f32, y f32) f32
|
||||
|
||||
// pow returns base raised to the provided power.
|
||||
[inline]
|
||||
pub fn pow(a f64, b f64) f64 {
|
||||
return C.pow(a, b)
|
||||
}
|
||||
|
||||
// powf returns base raised to the provided power. (float32)
|
||||
[inline]
|
||||
pub fn powf(a f32, b f32) f32 {
|
||||
return C.powf(a, b)
|
||||
}
|
||||
Reference in New Issue
Block a user