Skip to content

Commit

Permalink
Implement floor() using libm (esp-rs#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellishg authored and bjoernQ committed May 24, 2024
1 parent c297b08 commit 148dcc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions esp-wifi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ embassy-sync = { workspace = true, optional = true }
embassy-futures = { workspace = true, optional = true }
embassy-net-driver = { workspace = true, optional = true }
toml-cfg.workspace = true
libm.workspace = true

[features]
default = [ "utils", "log" ]
Expand Down
4 changes: 2 additions & 2 deletions esp-wifi/src/common_adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,6 @@ pub unsafe extern "C" fn strrchr(_s: *const (), _c: u32) -> *const u8 {

#[no_mangle]
#[linkage = "weak"]
pub unsafe extern "C" fn floor(_v: f64) -> f64 {
todo!("floor")
pub unsafe extern "C" fn floor(v: f64) -> f64 {
libm::floor(v)
}

0 comments on commit 148dcc3

Please sign in to comment.