use_ceil
Reactive ceil()
.
Demo
Usage
use leptos::prelude::*;
use leptos_use::math::use_ceil;
#[component]
fn Demo() -> impl IntoView {
let (value, set_value) = signal(44.15);
let result: Signal<f64> = use_ceil(value); // 45
assert_eq!(result.get(), 45.0);
view! { }
}
Feature
This function is only available if the crate feature
math
is enabled