diff --git a/Cargo.toml b/Cargo.toml index dc6a6d5..e638bc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,7 @@ version = "0.1.0" edition = "2018" authors = [ "The LibM Team of HaruxOS" ] description = "A port of `libm` that has all the required no_mangle and extern-cs for linking." -license = "MPL-2.0" \ No newline at end of file +license = "MPL-2.0" + +[dependencies] +libm = "0.2.1" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 61f4c11..b8a3b7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,16 @@ * The externc-libm library. * * Author: HTG-YT - * Copyright (c) 2021 The Bootmgr Team of the HaruxOS Project + * Copyright (c) 2021 The LibM Team of the HaruxOS Project */ -#![no_std] \ No newline at end of file +#![no_std] + +#[path = "math/acos.rs"] +pub mod acos; +#[path = "math/acosf.rs"] +pub mod acosf; +#[path = "math/acosh.rs"] +pub mod acosh; +#[path = "math/acoshf.rs"] +pub mod acoshf; \ No newline at end of file diff --git a/src/math/acos.rs b/src/math/acos.rs new file mode 100644 index 0000000..fff2ccb --- /dev/null +++ b/src/math/acos.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/acos.rs + * + * The acos function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn acos(x: f64) -> f64 { + libm::acos(x) +} \ No newline at end of file diff --git a/src/math/acosf.rs b/src/math/acosf.rs new file mode 100644 index 0000000..7175129 --- /dev/null +++ b/src/math/acosf.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/acos.rs + * + * The acosf function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn acosf(x: f32) -> f32 { + libm::acosf(x) +} \ No newline at end of file diff --git a/src/math/acosh.rs b/src/math/acosh.rs new file mode 100644 index 0000000..7b23edb --- /dev/null +++ b/src/math/acosh.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/acos.rs + * + * The acosh function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn acosh(x: f64) -> f64 { + libm::acosh(x) +} \ No newline at end of file diff --git a/src/math/acoshf.rs b/src/math/acoshf.rs new file mode 100644 index 0000000..7320732 --- /dev/null +++ b/src/math/acoshf.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MPL-2.0 +/* + * File: src/math/acos.rs + * + * The acoshf function. + * + * Author: HTG-YT + * Copyright (c) 2021 The LibM Team of the HaruxOS Project + */ + +#[no_mangle] +pub extern "C" fn acoshf(x: f32) -> f32 { + libm::acoshf(x) +} \ No newline at end of file