On this page
useAbs
Category | @Math |
---|---|
Export Size | 115 B |
Package | @vueuse/math |
Last Changed | 2 weeks ago |
Reactive Math.abs
.
Usage
import { useAbs } from '@vueuse/math'
const value = ref(-23)
const absValue = useAbs(value) // Ref<23>
Type Declarations
/**
* Reactive `Math.abs`.
*
* @see https://vueuse.org/useAbs
*/
export declare function useAbs(
value: MaybeRefOrGetter<number>
): ComputedRef<number>
Source
© 2019-present Anthony Fu
Licensed under the MIT License.
https://vueuse.org/math/useAbs/