| 93 |
|
or(a,b) : if( a, a, b ); |
| 94 |
|
not(a) : if( a, -1, 1 ); |
| 95 |
|
xor(a,b) : if( a, not(b), b ); |
| 96 |
< |
abs(x) : if( x, x, -x ); |
| 96 |
> |
abs(x) : max(x, -x); |
| 97 |
|
sgn(x) : if( x, 1, if(-x, -1, 0) ); |
| 98 |
|
sq(x) : x*x; |
| 99 |
|
inside(a,x,b) : and(x-a,b-x); |
| 104 |
|
|
| 105 |
|
noop(v) : v; |
| 106 |
|
clip(v) : bound(0,v,1); |
| 107 |
< |
noneg(v) : if(v,v,0); |
| 108 |
< |
red(r,g,b) : if(r,r,0); |
| 109 |
< |
green(r,g,b) : if(g,g,0); |
| 110 |
< |
blue(r,g,b) : if(b,b,0); |
| 107 |
> |
noneg(v) : max(v,0); |
| 108 |
> |
red(r,g,b) : max(r,0); |
| 109 |
> |
green(r,g,b) : max(g,0); |
| 110 |
> |
blue(r,g,b) : max(b,0); |
| 111 |
|
grey(r,g,b) : noneg(.265074126*r + .670114631*g + .064811243*b); |
| 112 |
|
clip_r(r,g,b) : bound(0,r,1); |
| 113 |
|
clip_g(r,g,b) : bound(0,g,1); |