FilterFactory - Function "abs"

Back to function listing

Absolute value of a.

Syntax

abs(a)

Original Machine Code (in OPER resource) of Filter Factory 3.0 and 3.0.4 for Photoshop/Win32

58 pop eax (param_a) .
99 cdq edx = (eax>0) ? 0 : -1;
33 C2 xor eax,edx param_a = param_a ^ edx;
2B C2 sub eax,edx param_a -= edx;
50 push eax return param_a;