Added tangent calculation

Added tangent calculation to your project. :)
Yes, apologies I wasn't thinking when I was moving the code into a separate function, will amend today.