Skip to content
On this page

useFloor

Category
Export Size
199 B
Package
@vueuse/math
Last Changed
5 months ago

Reactive Math.floor.

Usage

ts
import { useFloor } from '@vueuse/math'

const value = ref(45.95)
const result = useFloor(value) // 45
import { useFloor } from '@vueuse/math'

const value = ref(45.95)
const result = useFloor(value) // 45

Type Declarations

typescript
/**
 * Reactive `Math.floor`
 *
 * @see https://vueuse.org/useFloor
 */
export declare function useFloor(
  value: MaybeComputedRef<number>
): ComputedRef<number>
/**
 * Reactive `Math.floor`
 *
 * @see https://vueuse.org/useFloor
 */
export declare function useFloor(
  value: MaybeComputedRef<number>
): ComputedRef<number>

Source

SourceDocs

Contributors

Anthony Fu
webfansplz

Changelog

v8.9.2 on 7/12/2022
e300c - feat: new function (#1817)

Released under the MIT License.