Add comprehensive reference documentation for: - Vitest: environments, projects/workspaces, type testing, vi utilities - Pinia: HMR, Nuxt integration, SSR setup - Vue: built-in components (Transition, Teleport, Suspense, KeepAlive) and advanced directives
32 lines
411 B
Markdown
32 lines
411 B
Markdown
---
|
|
category: '@Math'
|
|
---
|
|
|
|
# useRound
|
|
|
|
Reactive `Math.round`.
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { useRound } from '@vueuse/math'
|
|
|
|
const value = ref(20.49)
|
|
const result = useRound(value) // 20
|
|
```
|
|
|
|
## Type Declarations
|
|
|
|
```ts
|
|
/**
|
|
* Reactive `Math.round`.
|
|
*
|
|
* @see https://vueuse.org/useRound
|
|
*
|
|
* @__NO_SIDE_EFFECTS__
|
|
*/
|
|
export declare function useRound(
|
|
value: MaybeRefOrGetter<number>,
|
|
): ComputedRef<number>
|
|
```
|