mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
math: add sqrtf
This commit is contained in:
parent
c1c2b648ab
commit
d51c159160
@ -79,6 +79,9 @@ fn C.sinh(x f64) f64
|
|||||||
fn C.sqrt(x f64) f64
|
fn C.sqrt(x f64) f64
|
||||||
|
|
||||||
|
|
||||||
|
fn C.sqrtf(x f32) f32
|
||||||
|
|
||||||
|
|
||||||
fn C.tgamma(x f64) f64
|
fn C.tgamma(x f64) f64
|
||||||
|
|
||||||
|
|
||||||
@ -304,6 +307,11 @@ pub fn sqrt(a f64) f64 {
|
|||||||
return C.sqrt(a)
|
return C.sqrt(a)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sqrtf calculates square-root of the provided float32 value.
|
||||||
|
pub fn sqrtf(a f32) f32 {
|
||||||
|
return C.sqrtf(a)
|
||||||
|
}
|
||||||
|
|
||||||
// tan calculates tangent.
|
// tan calculates tangent.
|
||||||
pub fn tan(a f64) f64 {
|
pub fn tan(a f64) f64 {
|
||||||
return C.tan(a)
|
return C.tan(a)
|
||||||
|
Loading…
Reference in New Issue
Block a user