Returns the absolute value.
abs(x:number) -> numberabs(x:duration) -> duration
Description
Section titled “Description”This function returns the absolute value for a number or a duration.
x: duration|number
Section titled “x: duration|number”The value to compute absolute value for.
Examples
Section titled “Examples”from {x: -13.3}x = x.abs()
{x: 13.3}