Added TDEG function

Use your brain.