2021-08-22 23:35:28 +02:00
|
|
|
module math
|
|
|
|
|
|
|
|
fn JS.Math.cos(x f64) f64
|
|
|
|
|
|
|
|
fn JS.Math.sin(x f64) f64
|
|
|
|
|
2022-05-20 07:45:54 +02:00
|
|
|
// cos calculates cosine in radians
|
2021-08-22 23:35:28 +02:00
|
|
|
[inline]
|
|
|
|
pub fn cos(a f64) f64 {
|
|
|
|
return JS.Math.cos(a)
|
|
|
|
}
|
|
|
|
|
2022-05-20 07:45:54 +02:00
|
|
|
// sin calculates sine in radians
|
2021-08-22 23:35:28 +02:00
|
|
|
[inline]
|
|
|
|
pub fn sin(a f64) f64 {
|
|
|
|
return JS.Math.sin(a)
|
|
|
|
}
|