| 64 | static inline float linear_gradient(float x){return 1;} |
| 65 | static inline float logistic_gradient(float x){return (1-x)*x;} |
| 66 | static inline float loggy_gradient(float x) |
| 67 | { |
| 68 | float y = (x+1.)/2.; |
| 69 | return 2*(1-y)*y; |
| 70 | } |
| 71 | static inline float stair_gradient(float x) |
| 72 | { |
| 73 | if (floor(x) == x) return 0; |