Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Determines the absolute value of a value.

Files

lib_def.h

Prototype

Code Block
languagecpp
          DEF_ABS(val);


Arguments

aval

Value to calculate absolute value.

Returned Value

The absolute value of a val.

Required Configuration

None.

...

Ideally, DEF_ABS() should be defined in the custom mathematics library, lib_math.*. However, to maintain backwards compatibility with previously-released modules, DEF_ABS() is still defined in lib_def.h .

Example Usage

Code Block
languagecpp
          CPU_INT16S  val;
          CPU_INT16S  res;


          val = -101;
          res =  DEF_ABS(val);