标签:#CG

Posts

· 2018-01-03 · * CG *

From:http://developer.download.nvidia.com/CgTutorial/cg_tutorial_appendix_e.html

Mathematical Functions

Func Description
abs(x) Absolute value of x .
acos(x) Arccosine of x in range [0, p], x in [–1, 1].
all(x) Returns true if every component of x is not equal to 0. Returns false otherwise.
any(x) Returns true if any component of x is not equal to 0. Returns false otherwise.
asin(x) Arcsine of x in range [–p/2, p/2]; x should be in [–1, 1].
atan(x) Arctangent of x in range [–p/2, p/2].
atan2(y,x) Arctangent of y / x in range [–p, p].
ceil(x) Smallest integer not less than x .