add cos, cosf, cosh, coshf
This commit is contained in:
parent
7d4270f800
commit
cd890a1ecd
10
src/lib.rs
10
src/lib.rs
|
@ -49,4 +49,12 @@ pub mod ceilf;
|
|||
#[path = "math/copysign.rs"]
|
||||
pub mod copysign;
|
||||
#[path = "math/copysignf.rs"]
|
||||
pub mod copysignf;
|
||||
pub mod copysignf;
|
||||
#[path = "math/cos.rs"]
|
||||
pub mod cos;
|
||||
#[path = "math/cosf.rs"]
|
||||
pub mod cosf;
|
||||
#[path = "math/cosh.rs"]
|
||||
pub mod cosh;
|
||||
#[path = "math/coshf.rs"]
|
||||
pub mod coshf;
|
14
src/math/cos.rs
Normal file
14
src/math/cos.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/cos.rs
|
||||
*
|
||||
* The cos function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn cos(x: f64) -> f64 {
|
||||
libm::cos(x)
|
||||
}
|
14
src/math/cosf.rs
Normal file
14
src/math/cosf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/cosf.rs
|
||||
*
|
||||
* The cosf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn cosf(x: f32) -> f32 {
|
||||
libm::cosf(x)
|
||||
}
|
14
src/math/cosh.rs
Normal file
14
src/math/cosh.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/cosh.rs
|
||||
*
|
||||
* The cosh function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn cosh(x: f64) -> f64 {
|
||||
libm::cosh(x)
|
||||
}
|
14
src/math/coshf.rs
Normal file
14
src/math/coshf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/coshf.rs
|
||||
*
|
||||
* The coshf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn coshf(x: f32) -> f32 {
|
||||
libm::coshf(x)
|
||||
}
|
Loading…
Reference in a new issue