Skip to main content

absDiff

Returns the absolute difference between two numbers.

For the real difference — i.e. the value with its sign — use diff instead.

Parameters

  • X (number)

    The number to subtract from.

  • Y (number)

    The number to subtract.

Examples

ATL in Script

Result

[[absDiff(9, 7)]]

2

[[absDiff(7, 9)]]

2

[[absDiff(-9, 7)]]

16

[[absDiff(9, -7)]]

16

[[absDiff(-9, -7)]]

2

Note

This is a convenience function with the same effect as [[abs(diff(value1, value2))]].