tan

> # NAME

> tan - returns tangent of scalars and vectors.

> # SYNOPSIS

>       float  tan(float a);
>       float1 tan(float1 a);
>       float2 tan(float2 a);
>       float3 tan(float3 a);
>       float4 tan(float4 a);

>       half   tan(half a);
>       half1  tan(half1 a);
>       half2  tan(half2 a);
>       half3  tan(half3 a);
>       half4  tan(half4 a);

>       fixed  tan(fixed a);
>       fixed1 tan(fixed1 a);
>       fixed2 tan(fixed2 a);
>       fixed3 tan(fixed3 a);
>       fixed4 tan(fixed4 a);

> # PARAMETERS

> a

>   Vector or scalar of which to determine the tangent.

> # DESCRIPTION

> Returns the tangent of a in radians.

> For vectors, the returned vector contains the tangent of each element of the input vector.

> # REFERENCE IMPLEMENTATION

> tan can be implemented in terms of the sin and cos functions like this:

>       float tan(float a) {
>         float s, c;
>         sincos(a, s, c);
>         return s / c;
>       }

> # PROFILE SUPPORT

> tan is fully supported in all profiles unless otherwise specified.

> tan is supported via approximations of sin and cos functions (see the respective sin and cos manual pages for details) in the vs_1, vp20, and arbvp1 profiles.

> tan is unsupported in the fp20, ps_1_1, ps_1_2, and ps_1_3 profiles.

> # SEE ALSO

> atan, atan2, cos, dot, frac, sin, sincos