abs

From OpenGL Reference
Jump to navigation Jump to search

Return the absolute value of the parameter.

Declaration[edit]

genType abs( genType x );
genIType abs( genIType x );
genDType abs( genDType x );


Parameters[edit]

x - Specify the value of which to return the absolute.


Description[edit]

 abs returns the absolute value of x .


Version Support[edit]

abs (genType) 1.1+
abs (genIType) 1.3+
abs (genDType) 4.1+

See Also[edit]

 sign 


Copyright[edit]

Copyright© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.