The abs native AI script function returns the absolute value of the input value.
(absolute\_value: f)abs(value: f) // abs_f_f
(dist)abs(diff);
This example code calls the abs function with a difference between two values as input and returns and assigns the absolute value of that difference to the variable dist
.