fixed NaN
added argument
Merge pull request #4 from Nilera/gradient

Gradient