diff --git a/src/lib.rs b/src/lib.rs index 8dc7387..f61cec0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,4 +49,12 @@ pub mod ceilf; #[path = "math/copysign.rs"] pub mod copysign; #[path = "math/copysignf.rs"] -pub mod copysignf; \ No newline at end of file +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; \ No newline at end of file diff --git a/src/math/cos.rs b/src/math/cos.rs new file mode 100644 index 0000000..a13c58a --- /dev/null +++ b/src/math/cos.rs @@ -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) +} \ No newline at end of file diff --git a/src/math/cosf.rs b/src/math/cosf.rs new file mode 100644 index 0000000..c61f31d --- /dev/null +++ b/src/math/cosf.rs @@ -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) +} \ No newline at end of file diff --git a/src/math/cosh.rs b/src/math/cosh.rs new file mode 100644 index 0000000..8805a77 --- /dev/null +++ b/src/math/cosh.rs @@ -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) +} \ No newline at end of file diff --git a/src/math/coshf.rs b/src/math/coshf.rs new file mode 100644 index 0000000..1c88340 --- /dev/null +++ b/src/math/coshf.rs @@ -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) +} \ No newline at end of file