Skip to content
On this page

useFloor

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

Reactive Math.floor.

Usage

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

/**
 * 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

Changelog

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

Released under the MIT License.