2021-08-22 23:35:28 +02:00
|
|
|
module math
|
|
|
|
|
|
|
|
fn C.cosf(x f32) f32
|
|
|
|
|
|
|
|
fn C.sinf(x f32) f32
|
|
|
|
|
2022-05-20 07:45:54 +02:00
|
|
|
// cosf calculates cosine in radians (float32)
|
2021-08-22 23:35:28 +02:00
|
|
|
[inline]
|
|
|
|
pub fn cosf(a f32) f32 {
|
|
|
|
return C.cosf(a)
|
|
|
|
}
|
|
|
|
|
2022-05-20 07:45:54 +02:00
|
|
|
// sinf calculates sine in radians (float32)
|
2021-08-22 23:35:28 +02:00
|
|
|
[inline]
|
|
|
|
pub fn sinf(a f32) f32 {
|
|
|
|
return C.sinf(a)
|
|
|
|
}
|