How to use sin/cos math functions in templates?

Did you figure this out? Trying the same an need tan(elevation) for my python_scripts and import math fails?