add copysign, copysignf

This commit is contained in:
HTG-YT 2021-08-07 13:03:31 +08:00
parent e846d98bad
commit 7d4270f800
3 changed files with 33 additions and 1 deletions

View file

@ -46,3 +46,7 @@ pub mod cbrtf;
pub mod ceil; pub mod ceil;
#[path = "math/ceilf.rs"] #[path = "math/ceilf.rs"]
pub mod ceilf; pub mod ceilf;
#[path = "math/copysign.rs"]
pub mod copysign;
#[path = "math/copysignf.rs"]
pub mod copysignf;

14
src/math/copysign.rs Normal file
View file

@ -0,0 +1,14 @@
// SPDX-License-Identifier: MPL-2.0
/*
* File: src/math/copysign.rs
*
* The copysign function.
*
* Author: HTG-YT
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
*/
#[no_mangle]
pub extern "C" fn copysign(x: f64, y: f64) -> f64 {
libm::copysign(x, y)
}

14
src/math/copysignf.rs Normal file
View file

@ -0,0 +1,14 @@
// SPDX-License-Identifier: MPL-2.0
/*
* File: src/math/copysignf.rs
*
* The copysignf function.
*
* Author: HTG-YT
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
*/
#[no_mangle]
pub extern "C" fn copysignf(x: f32, y: f32) -> f32 {
libm::copysignf(x, y)
}