"""
This module has several trogonometric routines in degrees.
Typically used to interface with fortran codes.
"""
##################### IMPORT STANDARD MODULES #########################
from numpy import cos, sin, tan, arccos, arcsin, arctan, arctan2, degrees, radians
import typing as tp
from numba import jit
##########################################################################
[docs]@jit
def cosd(x: tp.Union[float,int]) -> float:
return cos(radians(x))
[docs]@jit
def sind(x: tp.Union[float,int]) -> float:
return sin(radians(x))
[docs]@jit
def tand(x: tp.Union[float,int]) -> float:
return tan(radians(x))
[docs]@jit
def acosd(x: tp.Union[float,int]) -> float:
return degrees(arccos(x))
[docs]@jit
def asind(x: tp.Union[float,int]) -> float:
return degrees(arcsin(x))
[docs]@jit
def atand(x: tp.Union[float,int]) -> float:
return degrees(arctan(x))
[docs]@jit
def atan2d(y: tp.Union[float,int],
x: tp.Union[float,int]) -> float:
return degrees(arctan2(y, x))