Skip to content

abs

Returns the absolute value.

abs(x:number) -> number
abs(x:duration) -> duration

This function returns the absolute value for a number or a duration.

The value to compute absolute value for.

from {x: -13.3}
x = x.abs()
{x: 13.3}

Last updated: