abs<T extends num> static method

T abs<T extends num>(
  1. T a
)

Returns the Absolute value of a.

Implementation

static T abs<T extends num>(T a) => a >= 0 ? a : -a as T;