add atan, atan2, atan2f, atanf
This commit is contained in:
parent
cb14afb28a
commit
f83a7e6201
|
@ -26,3 +26,11 @@ pub mod asinf;
|
|||
pub mod asinh;
|
||||
#[path = "math/asinhf.rs"]
|
||||
pub mod asinhf;
|
||||
#[path = "math/atan.rs"]
|
||||
pub mod atan;
|
||||
#[path = "math/atan2.rs"]
|
||||
pub mod atan2;
|
||||
#[path = "math/atan2f.rs"]
|
||||
pub mod atan2f;
|
||||
#[path = "math/atanf.rs"]
|
||||
pub mod atanf;
|
14
src/math/atan.rs
Normal file
14
src/math/atan.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/atan.rs
|
||||
*
|
||||
* The atan function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn atan(x: f64) -> f64 {
|
||||
libm::atan(x)
|
||||
}
|
14
src/math/atan2.rs
Normal file
14
src/math/atan2.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/atan2.rs
|
||||
*
|
||||
* The atan2 function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn atan2(y: f64, x: f64) -> f64 {
|
||||
libm::atan2(y, x)
|
||||
}
|
14
src/math/atan2f.rs
Normal file
14
src/math/atan2f.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/atan2f.rs
|
||||
*
|
||||
* The atan2f function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn atan2f(y: f32, x: f32) -> f32 {
|
||||
libm::atan2f(y, x)
|
||||
}
|
14
src/math/atanf.rs
Normal file
14
src/math/atanf.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
/*
|
||||
* File: src/math/atanf.rs
|
||||
*
|
||||
* The atanf function.
|
||||
*
|
||||
* Author: HTG-YT
|
||||
* Copyright (c) 2021 The LibM Team of the HaruxOS Project
|
||||
*/
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn atanf(x: f32) -> f32 {
|
||||
libm::atanf(x)
|
||||
}
|
Loading…
Reference in a new issue