Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

use_floor

Reactive floor().

Demo

Usage

use leptos::prelude::*;
use leptos_use_math::use_floor;

#[component]
fn Demo() -> impl IntoView {
let (value, set_value) = signal(45.95);
let result: Signal<f64> = use_floor(value); // 45

assert_eq!(result.get(), 45.0);
view! { }
}

Installation

cargo add leptos-use-math

Source

Source • Demo • Docs