What are "tan" and "atan"? As the title says, I'm confused on what tan and atan are. I'm writing a program in Java and I came across these two mathematical functions. I know tan stands for tangent but if possible could someone please explain this to me. I have not taken triginomotry yet (I've taken up to Algebra 1) so I don't really need a very in depth explanation since i wouldnt understand but just a simple one so i could move on with my program would be great! Thanks in advanced. Also if possible could someone possibly give me a link to an image/example of a tangent and atan.  

I think the following picture is useful [from Wikipedia]:

The tangent of a number $0<\theta<\pi/2$ is constructed by 


*

*taking a circle of radius 1, centered at the origin

*drawing the tangent at the point on positive $x$-axis

*drawing the line (ray) at an angle of $\theta$ from the origin

*constructing the intersection of these two lines

*measuring the distance between the intersection and the positive $x$-axis.


The final distance is the tangent  of $\theta$, denoted $\tan\theta$.
As others have mentioned, the arctangent of a number $0<d<\infty$ is the number $\theta$ for which $\tan\theta=d$. In other words, it is the angle for which, after performing the described procedure above, you get a distance of $d$. It is denoted in many ways, including atan $\theta$, arctan $\theta$, and $\tan^{-1}\theta$.
Note that I've only defined $\tan\theta$ for a limited collection of $\theta$: to get other values, you can use the identities $\tan(-\theta)=-\tan(\theta)$ and $\tan(\pi+\theta)=\tan\theta$. So for instance, if you knew that $\tan(\pi/4)=1$, then you would also know that 
$$\tan\left(-\frac{7\pi}{4}\right)
=-\tan\left(\frac{7\pi}{4}\right)
=-\tan\left(\frac{3\pi}{4}\right)
=-\tan\left(-\frac{\pi}{4}\right)
=\tan\left(\frac{\pi}{4}\right)
=1$$
From these facts you can also derive the rest of the arctangent values: it turns out that atan $-d$ = $-$atan $d$.
(This is not entirely true: the arctangent is technically a multivalued function, so you have to make some arbitrary choice of how to extend it to negative numbers. But the choice above is the most common one.)
