binding for Math.floor

This commit is contained in:
gaurikholkar
2018-06-27 10:44:43 +05:30
parent c16b9a903c
commit 073cf7455b
2 changed files with 34 additions and 0 deletions

View File

@ -360,6 +360,13 @@ extern {
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
#[wasm_bindgen(static_method_of = Math)]
pub fn clz32(x: i32) -> Number;
/// The Math.floor() function returns the largest integer less than or
/// equal to a given number.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor
#[wasm_bindgen(static_method_of = Math)]
pub fn floor(x: f32) -> Number;
}
// Number.